Bad things happen when magnetic fields get tangled!
Although the sun is a steady source of light, bathing the Earth in warmth, a very different picture emerges when you look at the details. The sun's turbulent surface gases, laced with magnetic fields, give rise to sunspots and tangled magnetic fields, whose energy must be released.. often violently. As opposing lines of magnetism are crowded into ever-smaller regions of space, magnetic energy builds up rapidly, and is released. This explosion of energy takes many forms, including the spectacular heating of gasses to over 20 million degrees, and the emission of powerful bursts of x-ray light. Over a period of less than an hour, a typical solar flare releases as much energy as dozens of hydrogen bombs. The entire solar surface is dotted with flares that come and go from hour to hour .The vast majority cannot be seen or detected by earth-bound instruments. The largest flares, such as the one on November 4, 2003, can blaze forth with enough energy to damage satellites near earth, or even increase astronaut radiation exposure.
For a very long time, scientists didn't have the proper tools to investigate how solar flares occur. Since the 1800's, astronomers have invented the spectroscope, the spectroheliograph, the coronagraph, and the Zeeman Doppler spectrometer. These instruments allow solar physicists to zoom-in on sunspots and other active regions, and see how physical conditions change before, during and after a flare. Armed with powerful theories of how magnetic fields and charged particles interact, they can sift through the data to sharpen our understanding of the entire cradle-to-grave flare process. Here is what we think is going on so far:
First you need a sunspot, with its magnetic field poking through the solar surface. Sunspots, however, are not rigid features on the sun, but are pliable and can be distorted like thick putty by convection currents and other motions of the surrounding plasma at the solar surface. Normally, these loops look very smooth and much like an upside-down letter 'U' with the foot points anchored to each of the spots in a sunspot group - one with a 'North' polarity, the other with a 'South' polarity. These loops will fill up with charged plasma which makes them visible to instruments that can detect the light from these gases. That's why spectroscopes are so important. They can filter out all the extraneous sunlight and only pass the specific light from hydrogen or calcium ions at high temperatures.
Next, the loop needs to become distorted and stretched. Flares are never seen in quiescent, stable and uniform sunspot magnetic fields. Magnetic field distortion can happen when another sunspot group collides with the first one, or a new sunspot group forms between the pairs of the current group. This temporarily generates a lot of magnetic stress. In some cases, the U-shaped loop may be narrowed to form an hour-glass shape. In other instances, the top of the loop may be drawn outwards into the corona forming a 'Y' shape.
At some point during the pre-flare changes, oppositely-directed magnetic field lines are dragged by gas motions into smaller and smaller volumns of space. It is well known in the science of electricity and magnetism that if you have opposite-directed magnetic field lines, a current is generated in the space between them by induction. These currents, in a pre-solar flare region, appear within the charged plasma that was originally present near the magnetic loops. As the opposing field lines get closer, these currents of gas become more and more intense.
Figure 2: Closeup of a flare seen with the Yohkoh satellite on January 13, 1992 showing location of x-ray emitting regions.
Like the current flowing in a lightbulb filiment, as the gas currents become more intense, they generate heat because the ions collide with neutral atoms in the gas which provides resistence to the current flow. This process takes less than an hour, and in most cases the friction heats the gases to temperatures of millions of degrees. Solar physicists studying the gases at the tops of pre-flare loops have begun to see this heating process take place. Over a short time, the gases emit more and more energetic forms of X-ray light, then gamma ray light. Resembling a miniature star, a magnetic loop begins to sport a bright gamma ray or X-ray spot near its apex, as highly energized ions heat local gases to nearly 80 million degrees C.
As the X-ray spot begins to grow in intensity, similar spots can appear near the footpoints of the original magnetic loop. This process eventually subsides over the course of a few minutes.
Figure 3: TRACE satellite image of a flaring magnetic field region (white) from an event on April 12, 2000.
Meanwhile as the currents are growing in strength near the magnetically-opposed region, the magnetic lines break and re-connect in a new shape as the stored magnetic energy is lost to heating the local gases. The new magnetic shape, if enough energy is available, can drag its own trapped clouds of plasma away from the sunspot flaring region and cause a brief, but powerful, ejection of matter into the solar corona and beyond. The largest of these ejections are called Coronal Mass Ejections. Only the most powerful solar flares are capable of launching these billion-ton clouds of gas into interplanetary space, although it is sometimes possible for a large number of smaller flares to make this happen as well.
The intensity of the flare, and the energies of the particles that have been emitted during reconnection, begin to wane in strength as the new magnetic field shape starts to relax into a less distorted shape.
Despite the above model for how solar flares happen, scientists still do not know exactly how 'magnetic reconnection' happens, and why some pre-flare conditions evolve into flares while other similar ones do not. We also do not know exactly how the heated gasses move during the evolution of the flare - a critical piece of information that is needed to confirm or disprove several competing flare theories.
The most powerful solar flare in the last 500 years occurred on September 2, 1859 and was sighted by two astronomers who happened to be looking at the sun at exactly the right time!