Magnet
Rare earth (lanthanoid) elements have a partially occupied "f" electron shell (which can accommodate up to 14 electrons). The spin of these electrons can be aligned, resulting in very strong magnetic fields, and therefore, these elements are used in compact high-strength magnets where their higher price is not a concern. The most common types of rare-earth magnets are samarium-cobalt and neodymium-iron-boron (NIB) magnets.
Exchange spring magnet
The magnetic moment of a bulk material is the sum of all of its atomic moments. The atomic moments' interactions with each other and with the externally applied field determine the behavior of the magnet. Each atomic magnetic moment tries to orient itself so that the total magnetic energy reaches a minimum. There are generally four types of energy competing with each other to reach equilibrium: each is derived from the exchange coupling effect, magnetic anisotropy, the magnetiostatic energy of the magnet, and the magnet's interaction with external field.