If you know where to look, you'll find magnets around you beyond the ones holding notes on the refrigerator door. Those are permanent magnets, objects containing iron that hold a magnetic charge. The magnet's relationship to electricity makes it especially useful. Electromagnets hold a magnetic charge temporarily. Engineers put that on-off property to use in many applications. Magnetic media can hold digital code that, among other uses, makes possible the words you're reading now.
Sticky Permanent Magnets
Scientists believe the liquid iron core of the earth creates the magnetic field that surrounds the planet. Magnetic north is very close to the North Pole. So, a small permanent magnet, suspended in water or air, will align north and south. That's a compass. Permanent magnets stick notes to refrigerators, hold toy parts together and attach ID badges to clothing.
A diaphragm is a flexible material that stretches at its centre. When an electromagnet receives an electric charge, it will repulse a permanent magnet positioned in its core. If that repulsed magnet is attached to a diaphragm, the resulting movement disturbs the air creating sound. That's how speakers -- in radios, telephones, TVs and computers -- work. The same process reversed makes a microphone.
In the most common uses of electromagnets, they make electricity -- by spinning a permanent magnet inside a coil of wire -- and power motors -- by using pulses of electromagnetism to spin a permanent magnet in its coil. Cars use electric generators to spark the engine cylinders and power electrical equipment and lights. Large electric motors lift elevators. Medium-size electric motors power the condenser that cools the refrigerator, electric fans, car engine starters, washing machines and dryers, blenders and mixers, dishwashers and vacuum cleaners. Small electric motors run nondigital clocks, electric toothbrushes and computer hard drives.
Plastic composites can hold magnetic material. When charged in digital on-off patterns, they can hold data.The most common uses include the surfaces of computer hard drives and the strips on the back of debit/credit cards.