Magnetosphere plays role of gatekeeper
An immense magnetic field, called the magnetosphere, surrounds Earth. Generated by powerful, dynamic forces, the magnetosphere shields us from the erosion of the atmosphere by the solar wind (charged particles our sun continually spews at us), erosion and particle radiation from coronal mass ejections (massive clouds of energetic and magnetized solar plasma and radiation), and cosmic rays from deep space.
NASA claims that the magnetosphere plays the role of gatekeeper, repelling unwanted energy harmful to life on Earth, trapping most of it a safe distance from Earth’s surface in twin doughnut-shaped zones called the Van Allen Belts.