 The wheel in turn is connected to a magnet and the magnet spins because the wheel is spinning. The magnetic field in turn pushes, pushes the electron in a wire and therefore moves the electron in the wire creating electricity. That's how hydroelectric dams work.