In simplest terms, a diesel generator is a machine that converts chemical energy from diesel fuel into electrical energy. This process involves a combustion engine that burns diesel to produce mechanical energy, which is then converted into electrical energy by an alternator.