Every now and then huge explosions take place on the surface of the Sun that send super-heated gas flying out towards the Earth. This would be bad news for us if it wasn't for the fact that Earth's magnetic field (the same magnetic field that makes a compass point north) acts as a barrier and sheilds us from most of the damage. All of that energy has to go somewhere though and it eventually ends up being stored inside the magnetic field. One sign of this process taking place are the northern and southern lights (aurora) which always get brighter and extend closer to the equator after a solar storm has hit the Earth.
Scientists do not fully understand what causes these explosions although they think it has something to do with the Sun's own magnetic field. When that magnetic field get's twisted up by the motion of the Sun's surface, it's a little bit like stretching a rubber band. If you stretch it too much the rubber band (or magnetic field) snaps and the energy that's released (equivalent to thousands of atomic bombs) causes part of the Sun's surface to explode outwards into space. When the Sun's magnetic field is quiet, there are perhaps 5-6 explosions (or solar storms) every two weeks, but when the magnetic field is more disturbed and active this can increase to 1 or 2 per day. In general there is an 11 year variation in the activity of the Sun's magnetic field and we are just right now entering a period where the Sun's magnetic field is going to be more disturbed and solar storms (like the one in the news a few months ago) are likely to be more common.
If you're interested, the technical name for solar storms are Coronal Mass Ejections and, if they hit the Earth's magnetic field, the processes that take place to deflect it are collectively described as a Geomagnetic Storm.
---------------------------------
Daniel Went, MSci, fRAS, AmInstP
Imperial College London
http://danielwent.wordpress.com/