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
Historically, the north and south poles of a magnet were first defined by the Earth's magnetic field, not vice versa, since one of the first uses for a magnet was as a compass needle. A magnet's North pole is defined as the pole that is attracted by the Earth's North Magnetic Pole when the magnet is suspended so it can turn freely. Since opposite poles attract, the North Magnetic Pole of the Earth is really the south pole of its magnetic field (the place where the field is directed downward into the Earth).