Electromagnets, motors and generators
In 1820, the Danish scientist Hans Christian Oersted noticed that a wire carrying current made a nearby compass needle move. That showed electric current makes a magnetic field.
An electromagnet is a coil of wire, often wrapped around an iron core, that becomes a magnet when current flows and stops being one when you switch it off. More turns of wire or more current make it stronger. Electromagnets ring doorbells, move the cone in speakers to make sound, lift scrap metal in junkyards, and make the strong magnetic fields in hospital MRI scanners. Maglev ("magnetic levitation") trains use powerful magnets to float above the track and move with very little friction.
An electric motor uses electricity and magnets to make motion: the push between an electromagnet and other magnets makes a shaft spin. Fans, blenders, and electric cars all use motors.
In 1831, the English scientist Michael Faraday discovered the reverse: moving a magnet near a coil of wire makes current flow. That's how a generator works, turning motion into electricity. Most power plants spin huge generators using steam, falling water, or wind.