The Earth's magnetic field, or magnetosphere, stretches from the planet's core out into space, where it meets the solar wind, a stream of charged particles emitted by the sun. For the most part, the magnetosphere acts as a shield to protect the Earth from this high-energy solar activity.
But when this field comes into contact with the sun's magnetic field — a process called "magnetic reconnection" — powerful electrical currents from the sun can stream into Earth's atmosphere, whipping up geomagnetic storms and space weather phenomena that can affect high-altitude aircraft, as well as astronauts on the International Space Station.