Earth is surrounded by a system of magnetic fields, called the magnetosphere. The magnetosphere shields our home planet from harmful solar and cosmic particle radiation, but it can change shape in response to incoming space weather from the Sun.
The magnetosphere is the region of space surrounding Earth where the dominant magnetic field is the magnetic field of Earth, rather than the magnetic field of interplanetary space. The magnetosphere is formed by the interaction of the solar wind with Earth's magnetic field.