First off, the surface of the sun is anything but a calm and placid lake of plasma. It’s a raging inferno, with great plumes of super-heated material constantly rising to the surface and slinking back down. This great churn, known as convection, is the exact same process that happens in a boiling pot of water, but instead of water, you have ionized hydrogen; instead of a stovetop you have a nuclear core, and instead of air you have the vacuum of space. And the whole thing has a temperature of 10,000 kelvin.
If that weren’t bad enough, the sun also has a pretty strong magnetic field. Usually the magnetic field looks like the Earth’s, with nice, calm, straight, and parallel magnetic field lines running from one pole to the other.
The bright light in the lower right of the sun shows an X-class solar flare on Oct. 26, 2014, as captured by NASA's SDO. This was the third X-class flare in 48 hours, which erupted from the largest active region seen on the sun in 24 years.
And if that were the end of the story, it would be the end of the story.
Two things conspire to mess up the pretty picture of the sun’s magnetic fields. One is that constant up-down churn of the convection (did I mention that the plumes of material rising to the surface are each bigger than the Earth?). The second is the fact that the sun rotates faster around its middle than at its poles.
Imagine taking a bunch of pieces of cooked spaghetti and placing them in nice neat parallel lines. Now give a fork to a toddler. You get the idea.
X-rays stream off the sun in this image showing observations from by NASA's Nuclear Spectroscopic Telescope Array, or NuSTAR, overlaid on a picture taken by NASA's Solar Dynamics Observatory (SDO).
The sun constantly tangles up its magnetic field, twisting it into giant bundles of extra-big magnetic strength. These ropes of magnetic energy plunge chaotically into and out of the sun. Where they pierce the surface, they suppress the normal convection cycle, creating a relatively cool region – a sunspot.
And sometimes those magnetic fields get so tangled up that they snap, like a rubber band pulled too tight, releasing a torrent of energy in the process. That energy by itself is enough to power what’s called a solar flare: a flash of bright ultraviolet and X-ray radiation.
NASA's Goddard Space Flight Center/SDO
An X-class solar flare flashes on the edge of the Sun on March 7, 2012. This image was captured by NASA's Solar Dynamics Observatory and shows a type of light that is invisible to human eyes, called extreme ultraviolet light.
Sometimes, those snapping magnetic field lines also dredge up plasma from the surface of the sun and send it flying into space, an event known as a coronal mass ejection.