Science & Education · Explainer
How do magnets work? Magnetic fields, poles and everyday uses explained
Learn how magnets work, why only some metals are magnetic, what magnetic fields are, how Earth acts as a giant magnet and how electromagnets power modern life.

Short answerMagnets work because of magnetic fields created by moving electric charges, especially the spin of electrons in atoms. In materials like iron, these tiny magnetic effects line up in regions called domains, producing a field that attracts or repels other magnetic materials.
Key takeaways
- Magnetism comes from moving electric charge, including the spin of electrons inside atoms.
- In ferromagnetic materials such as iron, nickel and cobalt, atoms line up in domains that add together to make a magnet.
- Every magnet has a north and a south pole; like poles repel and opposite poles attract.
- Electricity and magnetism are linked, which is why electromagnets, motors and generators work.
A fridge magnet seems almost magical: it grips a metal door with no glue and no visible force. The explanation takes us deep inside atoms, and then out to the planet Earth itself.
The invisible field
A magnet is surrounded by a magnetic field, a region where it can exert force on other magnets and on certain metals. You cannot see the field, but you can reveal its shape by sprinkling iron filings around a bar magnet, which line up along curving lines from one end to the other. The lines are denser near the poles, where the force is strongest.
Poles: north and south
Every magnet has two poles. If you break a bar magnet in half, you get two smaller magnets, each with its own north and south pole. Opposite poles attract, and like poles repel, which you can feel when you try to push two magnets together. Isolated single poles, called monopoles, have been proposed by physicists but never observed.
Where magnetism comes from
Electric charges that move create magnetic fields. In an atom, electrons orbit the nucleus and also have a property called spin, which behaves like a tiny magnet. In most materials the electrons’ magnetic effects cancel out. In a few, including iron, nickel and cobalt, the atoms’ magnetic effects tend to line up with their neighbours. These materials are called ferromagnetic.
Within a piece of iron, groups of atoms line up in regions called domains. In an unmagnetised piece, the domains point in different directions and cancel each other. When you magnetise it, for example by stroking it with a magnet or placing it in a strong field, more and more domains line up, and the iron becomes a magnet.
Different kinds of magnet
| Type | What it is | Examples |
|---|---|---|
| Permanent magnet | Keeps its magnetism | Fridge magnets, compass needles, neodymium magnets |
| Temporary magnet | Magnetic only while in a field | Paperclips near a magnet |
| Electromagnet | A coil of wire with current, usually around an iron core | Scrapyard cranes, speakers, electric bells |
Strong permanent magnets are often made from alloys that include neodymium, iron and boron. Heating a magnet above a certain temperature, known as the Curie temperature, makes it lose its magnetism, and a hard knock can also scramble the domains.
Earth as a magnet
Earth has a magnetic field that is thought to be generated by the motion of molten iron in its outer core. A compass needle aligns with this field, which is why it points roughly north. The field extends into space as the magnetosphere, which deflects much of the charged particles streaming from the Sun and, where particles do reach the upper atmosphere near the poles, helps create the aurora. Some animals, including certain birds, appear to sense the field, as described in why birds migrate.
Electricity and magnetism are linked
A current of electricity creates a magnetic field, and a changing magnetic field can create a current. Those two facts underpin electric motors, generators, transformers and wireless charging. They are also why a coil of wire around a nail makes an electromagnet that you can switch on and off.
Magnets in everyday life
- Hard drives and card strips store information magnetically.
- Speakers and headphones use magnets and coils to turn electrical signals into sound.
- Magnetic resonance imaging (MRI) scanners use very strong magnets to create images of the body.
- Door catches, clasps and fridge doors use simple permanent magnets.
- Maglev trains use magnetic forces to lift and move carriages.
How strong is a magnet?
Magnetic field strength is measured in teslas (T). One tesla is a strong field, so everyday values are often given in thousandths (millitesla, mT) or millionths (microtesla, µT).
| Source | Approximate field |
|---|---|
| Earth’s field at the surface | About 30 µT near the equator to about 60 µT near the poles |
| A typical fridge magnet | A few millitesla |
| A hospital MRI scanner | Usually 1.5 to 3 T |
So an MRI scanner’s field is tens of thousands of times stronger than Earth’s, which is why metal objects are kept well away from it.
Earth’s wandering and flipping poles
Earth’s magnetic north pole is not fixed. It slowly drifts, which is why maps and navigation systems use regularly updated models of the field. Over much longer periods the whole field has reversed many times, so that a compass would have pointed south. Evidence for this is frozen into volcanic rocks and the sea floor, which record the direction of the field when they cooled. The last full reversal happened about 780,000 years ago. Reversals take hundreds to thousands of years, and there is no sign that one is about to happen.
Try it at home: make a compass
- Stroke a steel sewing needle with one end of a magnet, about 30 times, always in the same direction and lifting the magnet away between strokes. This lines up the domains in the needle.
- Push the needle through a small piece of cork, or lay it on a slice of cork or a leaf.
- Float it in a bowl of water, away from metal objects. The needle will slowly turn to line up roughly north–south with Earth’s magnetic field.
Children should do this with an adult, and take care with the needle.
Safety with magnets
Small, powerful magnets can be dangerous if swallowed, particularly by children. If two or more are swallowed, they can attract each other through the intestine walls and cause serious injury, so seek medical help immediately. Strong magnets can also pinch skin, and they may interfere with pacemakers and some medical implants, so keep them away from people who use such devices.
If you want to explore other everyday science, try how photosynthesis works or why the sky is blue.
Different types of magnets
Magnets differ in strength and how long they keep their magnetism.
- Permanent magnets: Keep their magnetism, such as fridge magnets and neodymium magnets.
- Temporary magnets: Act as magnets only near a strong magnetic field, such as paper clips.
- Electromagnets: Produce a magnetic field only while electricity flows, used in motors and scrapyard cranes.
- Superconducting magnets: Very strong electromagnets used in MRI scanners.
Magnets in medicine
Magnetic resonance imaging, or MRI, uses a very strong magnetic field and radio waves to make detailed pictures of the inside of the body. The field lines up tiny magnetic properties of hydrogen nuclei in the body's water and fat, and the signals they give off as they relax are turned into images. Because the magnet is so powerful, metal objects can be pulled into the scanner, which is why patients are carefully screened for implants, pacemakers and metal fragments before a scan. MRI does not use ionising radiation, unlike X-rays and CT scans.
Simple experiments with magnets
- Map the field: put a magnet under a sheet of paper, sprinkle iron filings on top and tap gently to see the field lines.
- Test materials: find out which household objects a magnet attracts. Most coins, foil and plastics will not stick.
- Make a temporary magnet: stroke a steel paperclip in one direction with a magnet, then see if it picks up another clip.
- Build an electromagnet: wrap insulated wire around an iron nail and connect it briefly to a battery, with adult supervision.
Final thoughts
Magnetism comes from the movement and spin of electrons, and it is closely linked to electricity. From Earth's magnetic field to the motors around us, magnets are part of everyday life. For more, browse the Science & Education guides on All Informations.
Sources and further reading
These official and reference pages support the key facts in this guide and are good places to read more. All Informations checked every link on 25 November 2026.
Frequently asked questions
Why do magnets stick to the fridge but not to aluminium cans?
Fridge doors contain iron or steel, which is ferromagnetic. Aluminium is not, so a magnet is not attracted to it in the same way.
Can a magnet lose its strength?
Yes. Heat, strong knocks and strong opposing fields can scramble the domains and weaken a magnet over time.
Can a magnet damage my phone or bank card?
Everyday magnets do not harm the memory in modern phones, but a strong magnet can disturb a phone’s compass, and can damage or erase the magnetic stripe on older bank cards. Keep strong magnets away from cards and devices to be safe.






