Generators use conventional fuel to generate electricity. Typically they run off diesel or unleaded petrol. The fuel powers a combustion engine much like the one in a lawn mower. This engine turns a dynamo which generates electricity.
The generator’s dynamo is based on the principle of electromagnetic induction; if a conductor is moved through a magnetic field then an electric current is induced in the conductor. In this way, the mechanical energy of the engine can be converted into electrical energy.