A solar flare is a violent explosion in the Sun's atmosphere with an energy equivalent to tens of millions of hydrogen bombs. Solar flares take place in the solar corona and chromosphere, heating the gas to tens of millions of kelvins and accelerating electrons, protons and heavier ions to near the speed of light. They produce electromagnetic radiation across the spectrum at all wavelengths from long-wave radio signals to the shortest wavelength gamma rays.
Solar flares were first observed on the Sun in 1859 by English astronomer Richard Carrington. Similar stellar flares have also been observed to varying degrees on other stars in modern times. The frequency of solar flares varies, from several per day when the Sun is particularly "active" to less than one each week when the Sun is "quiet". Solar flares may take several hours or even days to build up, but the actual flare takes only a matter of minutes to release its energy. Solar activity is classified as A, B, C, M or X according to the irradiance of its X-rays near Earth as measured on the GOES spacecraft in watts per square meter (W m-2). Each class is ten times more powerful than the preceding one, with X at 10-4 W m-2). Within a class there is a linear scale from 1 to 9, so an X2 flare (twice as powerful as an X1 flare) is four times more powerful than an M5 flare (five times as powerful as an M1 flare). Solar activity is normally within the A to C range. Class C flares have little effect on Earth, while the more powerful M and X flares can cause disruption and damage.
Flares generally stay below X10, but infrequently X designations run 'off the charts'. X20 events (2 mW m-2) that were recorded on August 16, 1989 and April 2, 2001 were outshone by a flare on November 4, 2003 that was the most powerful X-ray flare ever recorded: an X28 (2.8 mW m-2). Sunspot Region 486, where this flare originated (shown in the illustration several days before the eruption), was the most turbulently active sunspot ever recorded. The most powerful flare of the last 500 years was believed to have occurred in September 1859: it was seen by British astronomer Richard Carrington and left a trace in Greenland ice in the form of nitrates and beryllium-10, which allow its strength to be measured today. 
It was long thought that solar flares send out streams of highly energetic solar wind that can present a radiation hazard to spacecraft outside of a planetary magnetosphere and can disrupt radio signals on Earth. They were also thought to be a primary contributor to the aurora borealis and aurora australis and to Solar proton events. However, it is now thought that Coronal Mass Ejections (CMEs) that often, but not always, accompany flares, are the main cause of such effects on and around the Earth.
The radiation risk posed by solar flares and CMEs is one of the major concerns in discussions of manned missions to Mars. Some kind of physical or magnetic shielding will be required to protect the astronauts.
Solar flare 2003-10-28: from NASA