The energy associated with magnetic fields and their interactions with other magnetic fields or electric currents.