A genset is a combination of a prime mover, (typically an engine), and an alternator. An engine converts the chemical energy of a fuel to mechanical energy. That mechanical energy is used to spin the alternator rotor; converting mechanical energy to electrical energy.