Here’s a lovely NASA video a solar flare imaged several different ways, though I’m not fond of the music. Read the link in the preceding sentence to see how they’re caused.
On August 31, 2012 a long filament of solar material that had been hovering in the sun’s atmosphere, the corona, erupted out into space at 4:36 p.m. EDT. The coronal mass ejection, or CME, traveled away from the sun at over 900 miles per second. This movie shows the ejection from a variety of viewpoints as captured by NASA’s Solar Dynamics Observatory (SDO), NASA’s Solar Terrestrial Relations Observatory (STEREO), and the joint ESA/NASA Solar Heliospheric Observatory (SOHO).
And here’s a “cannibal coronal mass” from just three days ago: one ejection eats up another one. These things can cause spectacular auroras on Earth.