I’ve been curious about how electromagnets work. Because they are a magnet that can turn on and off they are a lot more versatile than a natural magnet which retains it’s magnetism all the time. Electromagnets are also interesting because you can make them more powerful with more current and coiled wire.
It’s surprisingly simple to make an electromagnet. Coil thin copper wire around a nail. Connect the ends to the opposite sides of a battery. But the battery heats up quickly, so if you want to have a more permanent magnet you need to create a seat for the battery and a switch to turn the current on and off.