How Magnetism Works — From Atoms to Earth

Photo: Nothing Ahead / Pexels
A refrigerator magnet and the field that shields every living thing on the planet from solar radiation come from the exact same source: electrons spinning inside atoms. Iron sticks to a magnet. Copper does not. Earth's core generates a field 25 to 65 microtesla strong that deflects a stream of charged particles racing outward from the Sun at roughly 400 kilometers (250 miles) per second. Both facts trace back to the same quantum mechanical property, just organized at wildly different scales. This piece walks through that chain, from a single unpaired electron to a planet-sized magnetic shield.
What actually makes something magnetic
Every magnetic field in the universe, without exception, comes from moving electric charge. There is no separate "magnetic substance." Inside an atom, electrons generate magnetism in two ways.
The first is orbital motion. An electron circling a nucleus behaves like a tiny loop of electric current, and any current loop produces a small magnetic field, exactly the same principle behind an electromagnet coil. The second, and more important, source is spin. Electrons carry an intrinsic quantum property called spin, which makes each electron behave like a miniature bar magnet even when it isn't moving anywhere. Spin doesn't mean the electron is literally rotating like a top, it's a form of angular momentum baked into the particle itself, but the magnetic effect is real and measurable.
In most atoms, electrons pair up so that one spins "up" and one spins "down," and their magnetic effects cancel. This is why most elements on the periodic table show almost no magnetism at all. But a handful of elements, most notably iron, nickel, and cobalt, have unpaired electrons in their outer shells. Those unpaired spins don't cancel, and under the right conditions billions of them can point the same direction at once. That collective alignment is what a permanent magnet actually is.
Magnetic domains, the mechanism behind ferromagnetism
Unpaired electron spins alone don't explain why a nail isn't a magnet until you rub it with one. The missing piece is the magnetic domain, a microscopic region, typically somewhere between 0.1 and 1 millimeter across in ordinary iron, where a huge number of atomic spins are locked into the same alignment by a quantum interaction called the exchange force. Think of a domain as a tiny neighborhood where every resident has agreed to face the same direction.
In a piece of unmagnetized iron, thousands of these domains exist side by side, but each domain points in a different, essentially random direction. Averaged across the whole nail, the domains cancel each other out, and the metal shows no net magnetic field even though every individual domain inside it is fully magnetized. This is the part most people get wrong: an "unmagnetized" ferromagnet isn't actually free of magnetism at the microscopic level, it's just internally disorganized, like a crowd where everyone is shouting a different word so the net sound is noise.
Apply an external magnetic field, say by stroking the nail with a magnet or placing it near a strong electromagnet, and something specific happens. Domains that already happen to be aligned close to the field's direction grow at the expense of their neighbors, their domain walls physically shift through the material. Push the field strong enough and the domains that are pointed the "wrong" way flip entirely. Once most of the domains agree, the nail itself has a net magnetic field and can pick up paperclips.
Why does heating a magnet destroy it?
Heat adds random thermal jostling to every atom in a material. Above a specific temperature called the Curie temperature, that jostling overwhelms the exchange force holding domains together, and the aligned spins scramble into disorder. For iron the Curie temperature is 769°C (1,417°F); for cobalt it's 1,127°C (2,061°F); for nickel it's a much lower 358°C (676°F) (Testbook physics reference; supermagnete.de Curie temperature explainer). Cool the material back down and, in most ferromagnets, the domains can reorganize and regain magnetism, though not always with the same strength or direction as before.
The five families of magnetism
Not every material responds to a magnetic field the same way, and the differences come down to whether a material has unpaired electrons at all, and if so, how strongly neighboring atoms' spins interact with each other.
| Type | Example materials | What the spins do | Relative strength | Keeps magnetism without an applied field? |
|---|---|---|---|---|
| Ferromagnetism | Iron, nickel, cobalt, gadolinium | Spins lock into domains, aligning strongly | Very strong | Yes — permanent magnets |
| Ferrimagnetism | Magnetite (Fe₃O₄), ferrite ceramics | Opposing spins of unequal strength leave a net field | Strong | Yes |
| Paramagnetism | Aluminum, platinum, liquid oxygen | Spins partially align only while a field is present | Weak | No |
| Diamagnetism | Copper, water, bismuth, graphite | Electron orbits shift slightly to oppose any applied field | Very weak | No |
| Antiferromagnetism | Manganese oxide, chromium | Neighboring spins point opposite and fully cancel | None net | No |
Table: how the five recognized categories of magnetic response differ at the atomic level.
Diamagnetism deserves a second look because it's counterintuitive: every material on Earth is diamagnetic to some degree, since moving electrons always generate a tiny field that opposes an external one, by Lenz's law. It's just that in ferromagnetic and paramagnetic materials, this weak repulsive effect is completely swamped by the much stronger spin alignment. Diamagnetism is why frogs, and in principle any water-rich living thing, can be levitated in a sufficiently powerful magnetic field, a demonstration performed at Radboud University's High Field Magnet Laboratory in the Netherlands using a 16-tesla electromagnet, and for which physicist Andre Geim shared the 2000 Ig Nobel Prize in Physics.
From Oersted's compass to permanent magnets: how we learned to control the field
For most of human history, magnetism and electricity looked like two completely unrelated phenomena. That changed by accident on April 21, 1820, when Danish physicist Hans Christian Ørsted was demonstrating electric current to students and noticed a nearby compass needle swing whenever the current flowed through a wire. Reverse the current, and the needle swung the other way (American Physical Society, "July 1820: Oersted & Electromagnetism"). It was the first direct evidence that electric current generates a magnetic field, and it set off a wave of research across Europe within months, eventually leading André-Marie Ampère to formalize the mathematical relationship between current and magnetic force, work covered in more depth in our profile of Ampère's electromagnetism.
That discovery split practical magnetism into two branches that still define the field today: permanent magnets and electromagnets.
Permanent magnets hold their domain alignment on their own, no power required. Ordinary refrigerator magnets use ferrite ceramics, cheap and weak. The strongest commercial permanent magnets are neodymium-iron-boron (NdFeB), discovered independently in the early 1980s by Masato Sagawa at Sumitomo Special Metals in Japan and by John Croat at General Motors in the United States. Sagawa presented the Nd₂Fe₁₄B compound at the 1983 Magnetism and Magnetic Materials Conference in Pittsburgh, and the material has since become the dominant permanent magnet in electric vehicle motors, wind turbine generators, hard drives, and headphone speakers, in part because it replaced the much scarcer cobalt and samarium used in earlier high-strength magnets with more abundant iron and neodymium (Sagawa's Wikipedia biography summarizing the Sumitomo/GM parallel discovery). Sagawa received the 2022 Queen Elizabeth Prize for Engineering for the work.
Electromagnets, in contrast, only generate a field while current flows. Wrap insulated wire in a coil, called a solenoid, and pass current through it, and you get a field roughly proportional to the current and the number of turns. Wrap that coil around an iron core, and the core's own domains align with the coil's field and amplify it, often by a factor of hundreds or thousands, since you are now adding the core's ferromagnetism on top of the coil's raw current-generated field. Cut the power, and the field collapses almost instantly. That on/off switchability is why electromagnets, not permanent magnets, run electric motors, relays, particle accelerators, and MRI gradient coils, and why maglev trains use electromagnetic, not permanent, levitation and propulsion.
The most extreme public demonstration of what a well-engineered electromagnetic system can do is Japan's L0 Series maglev train, which set the current absolute world speed record for any rail vehicle, 603 km/h (374.7 mph), on the Yamanashi test line on April 21, 2015, spending 10.8 seconds above 600 km/h (Guinness World Records, "Fastest maglev train"). The train never touches the track; superconducting electromagnets on board interact with coils embedded in the guideway to both levitate and propel the train, essentially converting the same attraction-and-repulsion principle you feel between two bar magnets into forward thrust and a floating chassis.
Earth's magnetic field: the geodynamo
Zoom out from a lab electromagnet to planetary scale, and the same basic physics, moving electric charge generating a magnetic field, explains why Earth itself behaves like an enormous, slightly tilted bar magnet.
Roughly 2,890 to 5,150 kilometers (1,800 to 3,200 miles) below the surface sits Earth's outer core, a layer of liquid iron and nickel under enough heat and pressure to stay molten despite the crushing weight above it. This liquid metal is an excellent electrical conductor, and it is constantly churning, driven by heat escaping from the solid inner core and stirred into helical patterns by Earth's own rotation (the Coriolis effect). Moving conductive fluid carries electric charge with it, and that motion generates electric currents, which in turn generate a magnetic field. Crucially, the process is self-sustaining: the currents' own magnetic field feeds back into the fluid motion in a way that keeps reinforcing itself, a self-exciting dynamo, the same basic concept engineers use in a hand-crank generator, just on a scale of thousands of kilometers and millions of amperes (Glatzmaier & Roberts, "Three-dimensional convective dynamo solution," Nature, 1995).
The resulting field at Earth's surface is surprisingly weak, only 25 to 65 microtesla, about 100 times fainter than a typical refrigerator magnet held right up against your skin. But its reach matters more than its raw strength. That field extends far into space as the magnetosphere, and it deflects the solar wind, the constant outward stream of charged particles from the Sun, around the planet rather than letting it strike the atmosphere directly. Mars is the natural control experiment for what happens without this shield: its global dynamo shut down roughly four billion years ago, and planetary scientists link that loss directly to Mars's thin, stripped atmosphere today. Where solar particles do funnel down Earth's field lines near the poles, they collide with atmospheric gases and produce the aurora borealis and aurora australis.
Is Earth's magnetic field actually flipping right now?
Not imminently, but it is behaving unusually. The field has weakened measurably over the past two centuries, and one region in particular, the South Atlantic Anomaly stretching from South America to southern Africa, has grown by an area nearly half the size of continental Europe since 2014, according to tracking by the European Space Agency's Swarm satellite constellation (ESA, "Swarm reveals growing weak spot in Earth's magnetic field"). Inside the anomaly, the field is weak enough that satellites, including the Hubble Space Telescope, experience higher radiation exposure and occasional instrument glitches when passing through it. Separately, magnetic north has been sprinting across the Arctic toward Siberia, moving as fast as 50 to 55 kilometers per year during the 2000s and 2010s before slowing somewhat in the past five years; the U.S. and U.K.'s jointly maintained World Magnetic Model was updated in December 2024 (WMM2025) to account for the continued drift. Full polarity reversals, where magnetic north and south completely swap, happen on average every 200,000 to 300,000 years, though the timing is irregular; the last one, the Brunhes–Matuyama reversal, occurred about 780,000 years ago. Current data show real change, but nowhere near enough to say a reversal is underway. Reversals themselves, when they do happen, unfold over roughly 1,000 to 10,000 years, not overnight, so it isn't an event anyone alive would experience as sudden.
How animals read a field they can't see
Earth's magnetic field isn't just a shield, for a wide range of species it's a navigational instrument, a phenomenon called magnetoreception.
The best-studied case is migratory birds, especially European robins. Research led by Henrik Mouritsen and collaborators points to a light-sensitive protein called cryptochrome in the bird's retina, which appears to undergo a quantum mechanical process called a radical pair reaction when struck by certain wavelengths of light. The magnetic field subtly influences how that reaction unfolds, and the bird may perceive the result as a visual pattern overlaid on what it sees, effectively letting it "see" the field's direction the way a compass shows a needle (Mouritsen, "Long-distance navigation and magnetoreception in migratory animals," Nature, 2018). It's one of the few places in biology where quantum effects are seriously proposed to matter at body temperature, which is itself part of why the mechanism remains actively debated and studied rather than settled fact.
Loggerhead sea turtles use a cruder but well-documented version of the same sense. Research from Kenneth Lohmann's lab at the University of North Carolina has shown hatchlings can detect both the inclination (the angle field lines make with the surface) and the intensity of the local magnetic field, and use combinations of the two as a kind of coordinate system, a "magnetic map," to navigate thousands of kilometers of open ocean during their Atlantic gyre migration and return to nesting beaches years later.
Magnetotactic bacteria offer the most mechanically direct example. These microorganisms grow chains of magnetite (Fe₃O₄) or greigite crystals internally, called magnetosomes, that behave like a compass needle built into the cell itself. The bacterium doesn't sense the field so much as get physically torqued to align with it, which helps single-celled organisms navigate toward the low-oxygen sediment layers they prefer. Field-sensitive behavior has also been reported in salmon, sharks, honeybees, and lobsters, though the underlying mechanism in most of these species is still not conclusively identified, and some may combine more than one sensing pathway.
Where magnetism does the heaviest lifting in modern technology
Beyond compasses and fridge magnets, controlled magnetic fields underpin some of the most consequential machines in medicine, transportation, and computing.
Magnetic Resonance Imaging (MRI) is arguably magnetism's most direct benefit to human health. A clinical MRI scanner uses a superconducting magnet generating a field of roughly 1.5 to 3 tesla for routine diagnostic imaging, with specialized research systems reaching 7 tesla, tens of thousands of times stronger than Earth's own field. That field aligns the spins of hydrogen protons in the body's water and fat molecules. A precisely timed radiofrequency pulse then knocks those protons out of alignment, and as they relax back into position they emit faint radio signals whose timing and strength differ by tissue type. A computer reconstructs those signals into a cross-sectional image. Because MRI relies on magnetic fields and radio waves rather than ionizing radiation, it avoids the cumulative radiation exposure of X-rays or CT scans, which is part of why it's the imaging method of choice for repeated brain, joint, and soft-tissue studies.
Maglev transportation, already described above with Japan's L0 Series, uses the mutual repulsion and attraction between electromagnets to eliminate wheel-on-rail friction entirely, the main mechanical limit on how fast a conventional train can safely go.
Data storage has relied on magnetism since the earliest hard disk drives of the 1950s. A spinning platter coated in a ferromagnetic material stores each bit as the orientation of a microscopic magnetized region, read and written by a head that generates and senses tiny local fields. Even as solid-state drives replace hard disks in consumer devices, magnetic tape remains one of the cheapest and most durable mediums for long-term archival storage at data centers, precisely because a well-shielded magnetic domain doesn't degrade the way flash memory eventually does.
Electric motors and generators, the machines that convert electrical energy into mechanical motion and back, are direct engineering descendants of Ørsted's 1820 observation: a current-carrying coil inside a magnetic field experiences a force, and spinning a coil inside a field (or vice versa) is the basic operating principle behind everything from a phone's vibration motor to a hydroelectric dam's generator.
What people get wrong about magnetism
A few misconceptions come up often enough to be worth addressing directly.
The first is that "unmagnetized" iron has no internal magnetism at all. As covered above, it's the opposite: an ordinary iron nail is full of fully magnetized domains, they're just pointed in random directions that cancel out on average. Magnetizing it is a matter of organizing existing magnetism, not creating new magnetism from nothing.
The second is the belief that magnetic fields can meaningfully affect human health or biology at the strengths involved in daily life, an idea behind "magnetic therapy" bracelets and mattress pads. Static magnetic fields up to several tesla, well beyond what any consumer product generates, have no established biological effect on soft tissue, and clinical reviews have found no evidence that low-strength magnetic devices relieve pain or improve circulation. What actually matters clinically about MRI-strength fields isn't a biological effect on tissue, it's the risk of ferromagnetic objects, oxygen tanks, older-generation pacemakers, metal fragments, being violently pulled into the bore, which is why MRI facilities run strict metal screening before every scan.
The third is the search for a magnetic monopole, a hypothetical particle carrying only a north or south pole with no opposite partner. Certain grand unified theories in particle physics predict monopoles should exist, and searches have run for decades, including dedicated detectors at experiments like MoEDAL at CERN, but none has ever been confirmed. Every magnet ever measured, cut it in half as many times as you like, always produces two new magnets, each with both a north and a south pole.
The takeaway
Every magnetic effect in the universe, from a compass needle to Earth's shield against the solar wind, comes from the same source: electric charge in motion, mostly the intrinsic spin of unpaired electrons. What changes across scales is organization, whether billions of atomic spins lock into aligned domains inside a chunk of iron, or a planet's worth of molten metal churns into a self-sustaining dynamo. Understanding that one mechanism scales cleanly from a subatomic particle to a planetary shield is what makes magnetism worth learning properly rather than treating as an unexplained force that just happens to hold notes to a fridge.
FAQs
Q: Why are only iron, nickel, and cobalt strongly magnetic at room temperature? A: Their atoms have unpaired electrons whose spins can lock together cooperatively into domains through the exchange force, and that alignment survives thermal jostling at everyday temperatures. Most other elements either have fully paired electron spins or lose alignment too easily to thermal motion.
Q: What is a magnetic monopole? A: A hypothetical particle carrying only a north or south magnetic charge, with no opposite pole. Decades of searches, including dedicated experiments at CERN, have found none; every real magnet always has both poles, no matter how many times you cut it.
Q: Can magnets lose their strength over time? A: Yes, gradually. Heat near the Curie temperature, physical shock, exposure to an opposing field, or simple age can disturb domain alignment. High-quality neodymium magnets typically lose less than a few percent of their strength per decade if kept cool and undamaged.
Q: Is Earth's magnetic field really flipping right now? A: The field is weakening in places and the magnetic north pole is drifting rapidly toward Siberia, but a full polarity reversal takes roughly 1,000 to 10,000 years to complete once it starts, and the last one was about 780,000 years ago. Current data show unusual change, not an active reversal.
Q: Are MRI machines dangerous? A: The static magnetic field itself has no established effect on soft tissue at clinical strengths. The real danger is ferromagnetic objects, oxygen tanks, older pacemakers, metal fragments, being pulled into the bore with enough force to injure someone, which is why facilities run strict pre-scan metal screening.
Q: Do magnets affect human health or biology directly? A: No credible evidence supports claims that consumer-strength static magnetic fields, such as those in "magnetic therapy" bracelets, improve circulation or relieve pain. Fields many times stronger, used in MRI, have no proven direct biological effect on tissue either.
Q: How do migratory birds sense Earth's magnetic field? A: The leading hypothesis involves a light-sensitive protein called cryptochrome in the retina, which may undergo a quantum radical-pair reaction that's subtly influenced by the surrounding magnetic field, potentially letting the bird perceive field direction as a visual overlay. The exact mechanism is still actively studied.
Q: What's the difference between a permanent magnet and an electromagnet? A: A permanent magnet holds its internal domain alignment on its own with no power source, like a refrigerator magnet or a neodymium disc. An electromagnet only generates a field while electric current flows through its coil, which makes it switchable, the basis for motors, relays, and MRI machines.
Q: Why does Earth have a magnetic field at all? A: Convecting liquid iron and nickel in Earth's outer core, roughly 2,890 to 5,150 kilometers (1,800 to 3,200 miles) deep, is stirred by core heat and the planet's rotation. That moving conductive fluid generates electric currents, which generate a self-sustaining magnetic field called the geodynamo.
Q: What is the South Atlantic Anomaly? A: A region of unusually weak magnetic field strength stretching from South America to southern Africa, where satellites experience elevated radiation exposure. ESA's Swarm satellites have tracked the anomaly growing by nearly half the area of continental Europe since 2014.
Sources
- American Physical Society, "July 1820: Oersted & Electromagnetism"
- Masato Sagawa — biography and NdFeB magnet discovery timeline
- Guinness World Records — "Fastest maglev train" (603 km/h, L0 Series, 2015)
- Glatzmaier, G.A. & Roberts, P.H. (1995). "Three-dimensional convective dynamo solution with rotating and finitely conducting inner core and mantle." Nature, 377, 203–209.
- ESA — "Swarm reveals growing weak spot in Earth's magnetic field"
- Mouritsen, H. (2018). "Long-distance navigation and magnetoreception in migratory animals." Nature, 558, 50–59.
- Testbook — Curie temperature of cobalt reference
- supermagnete.de — Curie temperature explainer
Read next:
Follow new articles
Add SciHub101 to your feed reader to see new science and technology stories.
About the Author
SciHub101 is an independent science and technology publication founded and edited by Buğra Sözeri, a software engineer and app developer based in Türkiye. AI tools assist with drafting and research. Source documentation in the existing archive is uneven, and articles are being reviewed and corrected. The Editorial Team byline identifies editorial responsibility; it does not certify specialist or independent human review. Where we compare products, anything built by our own team is labelled as such — see the editorial guidelines and About page for how corrections and disclosures work.
Related Articles

How Rainbows Form — Light and Water Drops
Rainbows explained: refraction, dispersion, the 42° angle, secondary bows, Alexander's dark band, and supernumeraries. Discover how it works, why it...

Thermodynamics and Entropy — Why Time Moves Forward
The four laws of thermodynamics, what entropy really means, heat engines, black holes, the arrow of time, and why life is a local entropy reversal.

André-Marie Ampère: Electromagnetism's Mathematician
Ampère discovered that electric currents create magnetic fields and developed the mathematical framework of electromagnetism. His laws still govern electrical engineering.

Faraday's Induction: From Magnets to Electricity
In 1831, Michael Faraday discovered that changing magnetic fields induce electric currents. This fundamental discovery enabled electric motors, generators, and transformed civilization.

How MRI Machines Work: Magnetic Resonance Imaging Explained
MRI sees inside your body without radiation by making hydrogen atoms in your tissues sing at a specific radio frequency.

Quantum Error Correction Explained: Physical Qubits, Logical Qubits and Thresholds
Quantum error correction protects one logical qubit across many noisy physical qubits. Learn how syndromes, surface codes, and thresholds work in practice.