A geomagnetic storm occurs when high-energy plasma and magnetic fields ejected from the sun interact with Earth's magnetic field.