The story starts with the sun,in some
places where the magnetic field is very high
it pushes itself out of the surface via plasma(ionized gas).When several tons of
plasma leaves the sun it is called solar storm.The storm continues its way till it becomes close to the Earth’s magnetic field.Therefore,The magnetic field of Earth
deflects the storm by coupling together(see image below).What happens is that the electrons from the solar storm interact with the Earth’s atmosphere following the field lines to north and south poles.Again,the interaction of electrons with the gas
atoms causes them to release both light and more electrons.