In the early 1800s AD, about 200 years ago, scientists in Denmark and Britain figured out another way to make magnets. This way you didn’t need a lodestone. You could also make much stronger magnets. And you could turn the magnets on and off.
When you hook up a copper wire to a battery, electrons begin to flow through the wire, moving from atom to atom, from one end of the battery to the other. They flow until they even out the negative and positive charges at each end of the battery. This makes a circle of electrons just like the circle of electrons inside an iron atom. And, just like the iron atom, that’s a magnet.
To make the iron atoms strong enough to be a useful magnet, you have to line up a lot of them all going the same way. It’s the same with an electromagnet. You have to make lots of copper wire circles all going the same way. If you wrap these coils around something made of iron, the coils will act like a lodestone and make that iron into a magnet. If you use thousands of coils of wire and a big piece of iron, you can make a very strong magnet that can pick up cars and huge machines.
But tiny electromagnets are also very useful, because you can turn them on and off by connecting and disconnecting the batteries. Alternating magnets make the electricity for your car lights and steering. They power stereo speakers and hold fire doors open. And they are inside all electric motors, like in a hair dryer or a washing machine.