A solar flare is defined as a sudden violent release of magnetic energy in or near the Sun's photosphere that often sends great amounts of radiation and highly accelerated charged particles into inteplanetary space. In short, flares are the most violent, eruptive events on the Sun. "Solar flares are thought be caused by a build up and then an explosive release of magentic energy in the solar atmosphere. The outer layer of the Sun is convective, meaning that the gas rolls up and down like in a pot of boiling water. This ionized gas (plasma) drags the Sun's magnetic field with it, twisting it and strengthening it. In some regions the magnetic field becomes particularly strong and breaks out into the solar atmosphere as discrete, loop-like structures. In active regions where flares occur, these structures either interact or become internally unstable, giving a flare. The signs of a flare are gas rapidly heated to high temperatures, electrons and ions accelerated to high energies, and bulk mass motions. The energy in the magnetic field is thought to be converted into these things through a process called magnetic reconnection, in which oppositely directed magnetic field lines "break" and connect to each other and part of their energy is transferred to the gas in the solar atmosphere. This is the basic picture. Some aspects of it may not be entirely correct and many of the details are not yet understood."
For more about flares see
http://hesperia.gsfc.nasa.gov/sftheory/