How Do Magnets Work?

Last edited Oct 14, 2026 · 5 min read

A fridge magnet seems almost too simple to need explaining. It sticks to the door, it does not stick to a soda can, and two magnets can snap together or push each other away. Behind each of those everyday facts is the same tiny actor: the electron. This explanation draws on the National High Magnetic Field Laboratory (the MagLab), which runs some of the most powerful magnets on Earth and publishes plain-language science guides.

1. What every magnet has in common

The MagLab lists a few properties shared by all magnets:

  • Every magnet has a north pole and a south pole.
  • Opposite poles attract, and like poles repel. North pulls on south; north pushes away north.
  • Every magnet is surrounded by a magnetic field. By convention, the field lines point away from the north pole and toward the south pole.

Earth itself is a giant magnet. The MagLab explains that scientists believe Earth's magnetic field comes from convection currents in the planet's liquid outer core, which is made largely of iron. This is called a geodynamo.

2. It all comes down to electrons

According to the MagLab, all magnetism comes down to electrons, in one of two ways:

  1. Moving electrons. An electric current, which is a flow of electrons through a wire, always creates a magnetic field. This is how electromagnets work.
  2. Spinning electrons. In permanent magnets like the one on your fridge, magnetism comes from the spin of the electrons. Each electron acts like a tiny magnet with its own north and south pole, and its axis can point in one of two possible directions.

3. Why most things are not magnetic

If every electron is a tiny magnet, why is not everything magnetic?

The MagLab explains that in most materials, atoms are arranged so the magnetic orientation of one electron cancels out another's. All those tiny magnets point in opposing directions, and their effects add up to nothing you can notice.

4. What makes iron special: magnetic domains

Iron and a few other substances are different. Their atoms group into small regions called magnetic domains. Inside each domain, the electrons share the same magnetic orientation.

So why is an ordinary iron nail not a magnet? Because the domains themselves point in different directions, so they still cancel each other overall.

Put that nail in a magnetic field, and the domains begin lining up in the same direction. The MagLab describes the result simply: a permanent magnet is an object in which all the domains are aligned the same way.

Materials that behave like this are called ferromagnetic. The MagLab notes that only four elements are ferromagnetic at room temperature and can be permanently magnetized: iron, nickel, cobalt, and gadolinium. A fifth, dysprosium, becomes ferromagnetic only at low temperatures. Aluminum is not on that list, which is why a magnet slides off an aluminum soda can. A fridge door, by contrast, is one of the everyday temporary magnets the MagLab lists in its classroom activity.

5. Permanent magnets vs temporary magnets

Permanent magnets keep their magnetism without any power. You cannot switch them off. The MagLab names ceramic magnets and alnico, an alloy of aluminum, nickel, and cobalt, as two common types.

Temporary magnets act like magnets only while they are in a magnetic field. Soft iron behaves this way, and the MagLab notes that this is why it is used as a temporary magnet in devices such as telephones and electric motors.

You can see this with paper clips. In a MagLab classroom activity, a paper clip touching a magnet becomes a magnet itself and can hold up a second paper clip. Pull the two clips away gently and they still cling to each other for a while, because their electrons are still organized. Drop them on a table and the jolt scrambles that order, so the magnetism is lost.

6. How magnets lose their pull

"Permanent" does not mean forever. The MagLab describes two main ways to demagnetize a magnet:

  • Heat. Adding heat adds energy that disrupts the alignment. The temperature at which a magnet can no longer hold its field is called the Curie point.
  • Impact. A hard blow, such as from a hammer, can knock aligned domains out of alignment.

How long a magnet lasts depends on its material. The MagLab notes that pure iron stays magnetized for just a few minutes, while many iron alloys hold their magnetism much longer.

7. Electromagnets: magnets with an on switch

In 1819, Hans Christian Ørsted noticed a compass needle turn when it was near a wire carrying current. The MagLab explains why: current always generates a magnetic field circling the wire.

A single straight wire makes a weak field. The MagLab describes how to make it stronger:

  1. Coil the wire. Wrapping it into loops combines the separate fields into a much stronger one. A coil like this is called a solenoid, and its field increases in proportion to the number of coils. Ten coils give about 10 times the field of one.
  2. Add an iron core. The iron's domains line up with the coil's field and boost it significantly without using more electricity.
  3. Increase the current. More power through the coil means a stronger field.

Turn off the current, and the field disappears.

8. How strong is a magnet?

Scientists measure magnetic field strength in tesla and gauss, where 1 tesla equals 10,000 gauss. The MagLab gives some comparisons:

Magnet Approximate strength
Earth's magnetic field 0.5 gauss (0.00005 tesla)
Typical fridge magnet 10 gauss
Most powerful permanent magnets about 1.5 tesla

Electromagnets can go much higher than permanent magnets, which is why research labs and hospital MRI scanners rely on them.

9. Key takeaways

  • Every magnet has a north and south pole; opposite poles attract and like poles repel.
  • Magnetism comes from electrons, either flowing as a current or spinning in place.
  • In most materials, electron magnets cancel out; in iron and a few other metals, they line up in domains.
  • A permanent magnet is a material whose domains all point the same way; heat or a hard knock can scramble them.
  • An electromagnet is a current-carrying coil, often with an iron core, and it switches off when the current stops.

Sources

  1. National MagLab Magnet Academy, Magnets from Mini to Mighty
  2. National MagLab Magnet Academy, Magnetizing and Unmagnetizing (lesson plan)
CategoriesScience for the Curioussciencemagnetsphysicseveryday science