Natural rock magnets formed of magnetite and called lodestones first caught the attention of soldiers in Europe during the Iron Age, which began about 1200 BC. When soldiers stuck the points of their iron-tipped spears in the ground, sometimes rocks would stick to them! The stones were a curiosity, but little more. (The Chinese, meanwhile, had developed a compasslike device as early as 2000 BC.)
Today, the scientific explanation for magnetism begins inside the atom.
Every atom has electrons that move around the center, or nucleus. These electrons not only move, they spin -just as the earth spins on its axis as it orbits the sun. The way electrons spin is believed to create magnetism, and it happens in every atom of every element.
So why isn't every element magnetic? If some electrons spin in one direction and others spin in another direction, the spins cancel out each other's magnetism. This is what happens in most materials, so most things aren't magnetic.
But in a few elements - iron, cobalt, and nickel, for example - the forces between the atoms cause many atoms to spin in the same direction. This gives the element its magnetic force.