A generator usually means a machine that makes electrical energy. A generator actually is converting the energy stored in a fuel to electrical energy. It does this by burning the fuel in an engine. The engine turns the shaft of the generator head. The head is specially designed so that when it spins, the moving magnetic fields in it make electricity flow through the wires.
Simple generators have:
- a rotor, which is the moving part of the generator
- a commutator, which is a switch that reverses the current
- an axle
- a magnet
- power supply