To answer this, we start with the sun whose energy production is far from even and fluctuates on an 11 year cycle. Maximum production coincides with high sunspot activity when processes on the sun’s surface throw particles far out in space. These particles are called the solar wind and cause the northern lights.
The sun’s surface temperature is approximately 6,000°C, much cooler than the interior which is several million degrees. In the sun’s atmosphere or corona, the temperature rises again to several million degrees. At such temperatures, collisions between gas particles can be so violent that atoms disintegrate into electrons and nuclei. What was once hydrogen becomes a gas of free electrons and protons called plasma. This plasma escapes from the sun’s corona through a hole in the sun’s magnetic field. As they escape, they are thrown out by the rotation of the sun in an ever widening spiral – the so-called garden-hose effect.
After 2-5 days’ travel trough space, the plasma reaches the earth’s magnetic field compressing it on the daylight side of the earth, and stretches it into a “tail” on the night side. A few of the particles penetrate down to the earth along the lines of magnetic field in the polar areas. Most, however, are forced around the earth by the magnetic field and enter the “tail” which stretches out into a long cylinder. Its diameter is equivalent to 30-60 times the earth’s radius, and its length up to 1000 times the same radius. It is, in effect, as if the earth’s magnetic field creates a tunnel in the plasma current from the solar wind. Inside one end is the earth, and around its surface the earth’s magnetism and the solar wind interact. The magnetic tail is divided into two by a sheet of plasma. The magnetic field lines from the earth’s north and south pole stretch out in their respective halves such that the fields are in opposition. The electrons and protons in each half of the plasma rotate in opposite direction forming a huge “dynamo” with the positive pole on the side of the plasma sheet facing dawn and the negative pole facing evening. The “dynamo” is driven by the current of charged particles between the two poles.
When the northern lights break out the following happens. The solar wind strengthens and the magnetic tail becomes unstable. Charged particles dive inwards towards the center of the tail and cause it to increase in length and to taper. The particles draw the magnetic field lines toward the center where they meet causing a magnetic “short-circuit” approximately 15 times the earth’s radius above the earth on the night side. This occurs especially at the “dynamo’s” two poles where a large amount of energy becomes stored. The magnetic field lines from both sides of the plasma layer now act as conductors in the “dynamo’s” outer circuit.