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.
Lodestone
The process by which lodestone is created has long been an open question in geology. Only a small amount of the magnetite on the Earth is found magnetized as lodestone. Ordinary magnetite is attracted to a magnetic field like iron and steel is, but does not tend to become magnetized itself; it has too low a magnetic coercivity (resistance to demagnetization) to stay magnetized for long. Microscopic examination of lodestones has found them to be made of magnetite (FeO) with inclusions of maghemite (cubic FeO), often with impurity metal ions of titanium, aluminium, and manganese. This inhomogeneous crystalline structure gives this variety of magnetite sufficient coercivity to remain magnetized and thus be a permanent magnet.