You can find these devices in lots of places, including motors, speakers, tape recorders and computers. They are made up of a coil of wire wrapped around a core of soft magnetic material, and they work when an electric current is flowing. They attract steel. They are electromagnets.
Making one is relatively straightforward, although care needs to be taken when working with batteries.
Hans Christian Oersted, a Danish physicist, first recognised the link between electricity and magnetism. He was experimenting in his laboratory when he noticed that a compass needle moved when a current flowed through a nearby wire.
You can replicate his experiment using insulated copper wire and a small battery. Place a compass next to the wire, and note where the needle is pointing.
Attach one of the ends of the wire to the negative terminal of the battery.
Attach the other to the positive terminal through an electrical switch.
Turn the switch on and watch the compass. You should see the needle move.
Now swap the ends of the wire over and try the experiment again - the needle should move in the opposite direction. The electric current causes a magnetic field around the wire and this affects the compass.
To make an electromagnet, take a plastic-handled screwdriver and wrap the insulated copper wire around the metal part, making sure that the wire lies flat. Secure each end with tape to stop the wire sliding off.
Attach each end of the wire to the terminals of a 9-volt battery, passing through a switch at one end. Use the switch to turn the current on. Holding the screwdriver by the handle, place it near some paperclips. They should be attracted to the screwdriver.
Turn the current off, and the paperclips will fall back on the table. You have made an electromagnet. Take care, as the copper wire will heat up when there is a current flowing through it.
Sophie Duncan is project manager for science at the BBC www.bbc.co.uksn