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.
Ferrite (magnet)
A ferrite is a ceramic material made by mixing and firing large proportions iron(III) oxide (FeO, rust) blended with small proportions of one or more additional metallic elements, such as barium, manganese, nickel, and zinc. They are both electrically "non"-conductive, meaning that they are insulators, and ferrimagnetic, meaning they can easily be magnetized or attracted to a magnet. Ferrites can be divided into two families based on their resistance to being demagnetized (magnetic coercivity).