Magnet
Many materials have unpaired electron spins, and the majority of these materials are paramagnetic. When the spins interact with each other in such a way that the spins align spontaneously, the materials are called ferromagnetic (what is often loosely termed as magnetic). Because of the way their regular crystalline atomic structure causes their spins to interact, some metals are ferromagnetic when found in their natural states, as ores. These include iron ore (magnetite or lodestone), cobalt and nickel, as well as the rare earth metals gadolinium and dysprosium (when at a very low temperature). Such naturally occurring ferromagnets were used in the first experiments with magnetism. Technology has since expanded the availability of magnetic materials to include various man-made products, all based, however, on naturally magnetic elements.
Rare-earth magnet
The greater strength of rare-earth magnets is mostly due to two factors. First, their crystalline structures have very high magnetic anisotropy. This means that a crystal of the material preferentially magnetizes along a specific crystal axis but is very difficult to magnetize in other directions. Like other magnets, rare-earth magnets are composed of microcrystalline grains, which are aligned in a powerful magnetic field during manufacture, so their magnetic axes all point in the same direction. The resistance of the crystal lattice to turning its direction of magnetization gives these compounds a very high magnetic coercivity (resistance to being demagnetized).