Magnetism
Magnetism is a class of physical phenomena that are mediated by magnetic fields. Electric currents and the magnetic moments of elementary particles give rise to a magnetic field, which acts on other currents and magnetic moments. The most familiar effects occur in ferromagnetic materials, which are strongly attracted by magnetic fields and can be magnetized to become permanent magnets, producing magnetic fields themselves. Only a few substances are ferromagnetic; the most common ones are iron, nickel and cobalt and their alloys. The prefix "" refers to iron, because permanent magnetism was first observed in lodestone, a form of natural iron ore called magnetite, FeO.
Rare-earth magnet
Second, atoms of rare-earth elements can have high magnetic moments because their orbital electron structure contains many unpaired electrons, in contrast to other elements, in which almost all of the electrons exist in pairs with opposite spins, so their magnetic fields cancel out. This is a consequence of incomplete filling of the f-shell, which can contain up to 7 unpaired electrons. In a magnet it is the unpaired electrons, aligned so they spin in the same direction, which generate the magnetic field. This gives the materials high remanence (saturation magnetization "J"). The maximal energy density "BH" is proportional to "J", so these materials have the potential for storing large amounts of magnetic energy. The magnetic energy product "BH" of neodymium magnets is about 18 times greater than "ordinary" magnets by volume. This allows rare-earth magnets to be smaller than other magnets with the same field strength.