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.
Magnetic domain
The above describes magnetic domain structure in a perfect crystal lattice, such as would be found in a single crystal of iron. However most magnetic materials are polycrystalline, composed of microscopic crystalline grains. These grains are "not" the same as domains. Each grain is a little crystal, with the crystal lattices of separate grains oriented in random directions. In most materials, each grain is big enough to contain several domains. Each crystal has an "easy" axis of magnetization, and is divided into domains with the axis of magnetization parallel to this axis, in alternate directions.