How Do Magnets Work?
In short
Magnetism comes from electrons: electric currents and the spin of electrons both create magnetic fields.[1][5] In most materials, these tiny fields cancel out.[2] In iron, nickel and cobalt, atoms group into domains whose fields point the same way, and when those domains line up, the metal becomes a magnet with a north and a south pole.[1][2]

Key facts
What is a magnetic field?
Every magnet exerts a force on other magnets, and every magnet has a north pole and a south pole.[1] Opposite poles attract and like poles repel.[1][4] By convention, the field lines around a magnet point away from its north pole and toward its south pole.[1][4]
Field lines never cross, they form closed loops with no beginning or end, and the closer together they are drawn, the stronger the field.[4] A compass can trace these lines, because its needle is itself a small permanent magnet that turns until it lines up with the field.[4] Iron filings placed in a magnet's field become tiny magnets themselves.[1]
Magnetic sources are dipoles, with a north and a south pole, and a lone north or south "monopole" cannot be isolated.[4][5] Scientists measure the strength of a magnetic field in tesla or in gauss, where one tesla equals 10,000 gauss.[1][5]
Where does magnetism come from?
Magnetic fields are produced by electric currents.[5] These can be large currents flowing in wires or microscopic currents linked to electrons in atoms.[5] As the US National High Magnetic Field Laboratory (MagLab) puts it, all magnetism comes down to electrons.[1]
An electric current, which is a flow of electrons through a wire, always creates a magnetic field that circles the wire.[1] The Danish scientist Hans Christian Ørsted found this when a compass needle near a current-carrying wire swung to sit at right angles to it.[1]
In a permanent magnet, the source is different: the magnetism comes from the spin of electrons rather than from their movement through a conductor.[1] Every electron behaves like a very small magnet, with a north and a south pole, spinning around an axis.[2] In most materials, though, the magnetic orientation of one electron cancels out that of another.[2]
Why are iron, nickel and cobalt magnetic?
Iron, nickel and cobalt belong to a group of materials called ferromagnets, a name that comes from iron's Latin name, ferrum.[3] In these materials, the electrons' tiny magnetic fields line up and add together instead of cancelling out.[2] Groups of atoms band together in regions called magnetic domains, and inside each domain the magnetic moments of the atoms all point the same way.[2]
According to MagLab, only four elements are ferromagnetic at room temperature and can be permanently magnetized: iron, nickel, cobalt and gadolinium.[1][2] A fifth element, dysprosium, becomes ferromagnetic only at low temperatures.[1]
A plain piece of iron is usually not a magnet, because its many domains point in random directions relative to one another.[1][3] Placing the iron in a magnetic field brings the domains into line, and an object whose domains all point the same way is a magnet.[1] HyperPhysics, a physics reference from Georgia State University, notes that this may happen more through domains already lined up with the field growing at the expense of others than through domains turning.[3] Either way, a modest outside field can produce a much larger field in the iron.[3]
Every ferromagnet has a maximum temperature, called the Curie temperature, above which thermal agitation destroys its ferromagnetism.[3] For iron, the Curie temperature is about 1,043 kelvin, which converts to roughly 770 °C.[3]
How do permanent magnets and electromagnets differ?
MagLab divides magnets into two basic kinds: permanent and temporary.[1] A permanent magnet, such as one on a fridge, is made of ferromagnetic material and cannot be turned on and off with a switch.[1] Ferromagnets tend to keep some magnetization after an outside field is removed, a tendency called hysteresis.[3] Still, "permanent" does not mean forever: pure iron stays magnetized for only a few minutes, many iron alloys hold their magnetism much longer, and a hard blow from a hammer can knock the domains out of alignment.[1]
An electromagnet is a temporary magnet that is switched on by running a current through a wire.[1] Coiling the wire into a solenoid makes the fields around each turn join forces, and the field grows in proportion to the number of coils.[1] The field of a current-carrying coil looks much like that of a bar magnet.[4] An iron core inside the coil multiplies the field by factors of tens to thousands, because the iron's domains line up with the coil's field.[4]
MagLab gives these figures for everyday magnets and for its own high-field laboratory magnets.[1]
| Magnet | Field strength |
|---|---|
| Earth's magnetic field | About 0.5 gauss (0.00005 tesla)[1] |
| Fridge magnet | About 10 gauss[1] |
| Most powerful permanent magnets | About 1.5 tesla[1] |
| MagLab's resistive electromagnets | 35 tesla, sustained[1] |
| MagLab's hybrid magnet | 45 tesla, sustained[1] |
| Destructive pulsed magnets | Up to 1,000 tesla for a few microseconds[1] |
Why is Earth a magnet?
Earth itself is a magnet.[1][7] Its field is very similar to the one a straight dipole magnet would produce if it sat at the center of the planet.[7] More than 90% of the field measured at the surface is generated inside Earth, in the outer core.[7] That layer is about 2,250 kilometers (1,400 miles) thick and made of molten iron and nickel.[6] Convection, which carries heat from place to place, keeps the liquid metal churning, Earth's rotation swirls it into whirlpools, and the moving metal generates enormous electric currents.[6] This mechanism, which maintains Earth's magnetic field, is called the geodynamo.[6][1]
At the surface, the field strength is roughly 25,000 to 65,000 nanotesla (0.25 to 0.65 gauss), and it changes with time and location.[7] The field lines flow into Earth at the north magnetic pole and out at the south magnetic pole.[6] In magnet terms, the pole near the geographic North Pole is therefore a magnetic south pole, which is why the north end of a compass needle points toward it.[4]
The magnetic poles are not in the same place as the geographic poles, and they move.[6][7] NASA says that since the north magnetic pole was first precisely located in 1831, it has drifted more than 1,100 kilometers (600 miles), and its speed has risen from about 16 kilometers (10 miles) a year to about 55 kilometers (34 miles) a year.[6] NOAA, which notes that pole locations were added in 2001 and 2007, says the most recent survey found the pole moving north-northwest at about 55 kilometers a year.[7] Over longer spans, the poles swap places entirely: NASA says the field has reversed 183 times in the last 83 million years, most recently about 780,000 years ago.[6] NOAA dates that last reversal to about 750,000 to 780,000 years ago.[7]
Frequently asked questions
Why does a compass point north?
A compass needle is a small permanent magnet, and its north end lines up with Earth's magnetic field.[4] Earth's field lines enter the planet near the geographic North Pole, which is in fact a magnetic south pole, so it attracts the needle's north end.[4][6] The needle follows the horizontal part of the local field rather than pointing to one exact spot.[7]
Can a permanent magnet lose its magnetism?
Yes. A hard blow from a hammer can knock a magnet's aligned domains out of alignment, and pure iron stays magnetized for only a few minutes.[1] Heating a ferromagnet above its Curie temperature, about 1,043 kelvin for iron, also makes its ferromagnetism disappear.[3]
Can a magnet have only one pole?
No. Magnetic sources are dipoles, each with a north and a south pole, and a lone north or south "monopole" cannot be isolated.[4][5]
Why are only some materials magnetic?
In most materials, the magnetic orientation of one electron cancels out that of another.[2] In ferromagnetic materials, though, the electrons' fields line up and add together within domains, and MagLab lists just four elements that are ferromagnetic at room temperature: iron, nickel, cobalt and gadolinium.[1][2]
Sources
- [1]Magnets from Mini to Mighty · National High Magnetic Field Laboratory (National MagLab) · accessed October 4, 2026
- [2]Magnetic Domains · National High Magnetic Field Laboratory (National MagLab) · accessed October 4, 2026
- [3]Ferromagnetism · HyperPhysics, Georgia State University · accessed October 4, 2026
- [4]Magnets and Electromagnets · HyperPhysics, Georgia State University · accessed October 4, 2026
- [5]Magnetic Field · HyperPhysics, Georgia State University · accessed October 4, 2026
- [6]Earth's Magnetosphere: Protecting Our Planet from Harmful Space Energy · NASA Science · accessed October 4, 2026
- [7]Geomagnetism Frequently Asked Questions · NOAA National Centers for Environmental Information · accessed October 4, 2026
Cite this article
- APA
- BodaWiki Editorial. (2026, October 5). How Do Magnets Work? BodaWiki. https://bodawiki.com/wiki/how-do-magnets-work
- MLA
- “How Do Magnets Work?” BodaWiki, 5 Oct. 2026, bodawiki.com/wiki/how-do-magnets-work.
- Chicago
- BodaWiki Editorial. “How Do Magnets Work?” BodaWiki. October 5, 2026. https://bodawiki.com/wiki/how-do-magnets-work.