A Magnetic Personality
These eruptions are caused by the Sun’s intense magnetic field, which is much stronger than the Earth’s. In the lower layers that we mentioned above, the plasma is sufficiently dense to cause the magnetic lines of force to loop back to the layer’s surface, so the magnetic field stays within that layer.
This layer, however, is so tenuous, its plasma cannot contain the magnetic fields that course through it. Consequently, these fields just stretch upwards into the thin plasma and twist it around and about and create these massive eruptions and explosions.
The magnetic fields create another unique feature. Normally, the heat from the photosphere should dissipate as it moves upwards through the upper layer, so this upper layer should get cooler as you go higher. But it gets hotter. The temperature rises from an estimated 4500 degrees kelvin at the bottom to 10,000 degrees kelvin at the upper levels.
Astronomers believe this is caused by magnetohydrodynamic waves. If a magnetic field gets displaced, say, when it produces a prominence, when it tries to go back to its original shape it starts to oscillate. That oscillation creates waves in the plasma that generate heat.