Magnetic Fields
Magnetism and electricity are secretly the same force. I know that sounds crazy, but they're two aspects of the electromagnetic force - one of the fundamental forces. Moving charges create magnetic fields, and changing magnetic fields create electric currents.
This is how generators work - spin a magnet near wires, and you generate electricity. Run electricity through wires near magnets, and things spin. It's all connected.
Electromagnets
When you wrap wire around an iron core and run current through it, you get an electromagnet. The electron flow creates a magnetic field just like a bar magnet. But you can turn it off by cutting the current.
Electric motors, speakers, MRI machines - they all use electromagnets. Pretty useful stuff.