The final aspect of magnetism that is necessary to have a basic understanding
of the dynamics on the surface of the Sun is the idea that magnetic fields
can store energy. The energy stored in a magnetic field is essentially
the total amount of work required to assemble a system of moving charges.
Stored energy in magnetic fields can be illustrated in the following experiment
with a pair of magnets.

Orient the other magnet above the one on the table such that each pole
faces the same pole on the other magnet.

Bring the top magnet down onto the other one on the table. The magnets
should repel each other as you do this. Hold the stacked magnets together.

Let go of the magnets, being sure to move your hands out of the way. The
magnets will perform their acrobatics.

What's Going On?

When the two magnets are brought together, a force must be
exerted for a given distance, i.e. work is being done to bring these two
magnets together. Energy in the form of moving magnets is released when
the one lets go of them. This release of energy causes them to jump.