Exchange spring magnet
The magnetostatic energy is the energy stored in the field generated by a material's magnetic moments. The magnet's field reaches its maximum intensity if all the magnetic moments orient in one direction; this is what occurs in a hard magnet. In order to prevent building up the magnetic field, sometimes magnetic moments tend to form loops. That way, the energy stored in the magnetic field can be constrained; this is what occurs in a soft magnet. What determines whether a magnet is hard or soft is the dominant term of its magnetic energy. For hard magnets, the anisotropy constant is relatively large, making the magnetic moments align with easy axis. The opposite case applies to soft magnets, in which the magnetostatic energy is dominant.
Earth's magnetic field
The past magnetic field is recorded mostly by strongly magnetic minerals, particularly iron oxides such as magnetite, that can carry a permanent magnetic moment. This remanent magnetization, or "remanence", can be acquired in more than one way. In lava flows, the direction of the field is "frozen" in small minerals as they cool, giving rise to a thermoremanent magnetization. In sediments, the orientation of magnetic particles acquires a slight bias towards the magnetic field as they are deposited on an ocean floor or lake bottom. This is called "detrital remanent magnetization".