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 moment
The magnetic moment is a quantity that represents the magnetic strength and orientation of a magnet or other object that produces a magnetic field. Examples of objects that have magnetic moments include: loops of electric current (such as electromagnets), permanent magnets, elementary particles (such as electrons), various molecules, and many astronomical objects (such as many planets, some moons, stars, etc).