Magnets attract and repel because their magnetic fields have direction. When two magnets face each other with opposite poles, their fields line up in a way that pulls them together. When the same poles face each other, the fields push back.
At the deeper level, magnetism comes from electrons in atoms. In materials like iron, cobalt, and nickel, many tiny magnetic moments can line up in the same direction. When enough of them line up, the whole object behaves like a magnet instead of a random pile of canceling forces.
That is also why a refrigerator magnet only sticks to some things. Most materials do not have their magnetic moments arranged in a way that produces a strong field. A magnet can still pass through space and exert force, though, which is why you can feel attraction or repulsion before anything touches.
Electromagnets work the same general way, except the magnetic field comes from electric current instead of permanent magnetic alignment.
More in Science
Are alien abduction experiences real or explainable by psychology and sleep?
Most alien abduction stories fit sleep paralysis, vivid dreaming, suggestion, and memory effects better than literal extraterrestrial contact.
🔬 Science 5 weeks ago 3 min readCould a large undiscovered primate like Bigfoot still exist in North America?
It’s extraordinarily unlikely. A breeding population would leave bones, DNA, roadkill, or fossils, and North America has no credible evidence of that.
🔬 Science 5 weeks ago 2 min readDoes a true self actually exist?
Psychology treats the true self more like a useful belief or story than a measurable inner object.
🔬 Science 2 weeks ago 2 min read