Generators convert mechanical energy into electrical energy. The generators have a movement turbine, which when it is moved, causes an electrical current through the wire. Then, the current causes a magnetic field that collides with the magnet's magnetic field which causes the wire to spin. This causes a current through another wire connected to the bulb. Then the current reaches the bulb and it turns on. Also, it can be built with just a wire, a bulb and a magnet. You make a loop with the wire and connect both sides to the bulb. Then you move the magnet rapidly inside the loop to kick start the electrons. A generator is very similar to a motor, but the difference is that motors convert electric energy from a battery into mechanical energy. The generators are used in hydroelectric power plants and other wind turbines. This generators convert the mechanical energy of water and wind into electric energy.