The Earth is surrounded by a magnetic field with magnetic field lines that start at the north pole and end at the south pole.
The Sun has a similar large scale magnetic field, but it is much more complicated when you zoom in and look closely. This is because it has lots of little north and south magnetic poles randomly scattered across its surface. These little magnetic poles move about all the time because the solar surface is a bubbling gas.
In the picture below the black blobs are south poles and the white blobs are north poles. The magnetic field is drawn as lines joining the black and white blobs. They form a tangled mess of spaghetti (*LINK to Gloss*)! Some folks call this the Sun's 'magnetic carpet'. It keeps changing all the time. It's as if the carpet in your room changed its pattern every couple of days. Weird, or what?
A moving magnetic field creates an electric current. So all the little magnetic poles create strong electric currents as they move about. An electric current heats the gas, the solar corona, which gets very, very hot and gives out X-rays. When this happens we get fireflies.
Return to Solar Fireflies.