How generators work to produce alternating current (ac) or direct current (dc)
1. As the coil (or magnet) spins, a change in the magnetic field through the coil induces a potential difference, which can make a current flow in the wire
2. Every time the magnet moves through half a turn, the direction of the magnetic field through the coil reverses. When this happens, the potential difference reverses, so the current flows in the opposite direction around the coil of wire
3. If you keep turning the magnet in the same direction, the potential difference will keep on reversing every half turn and you'll get an alternating current