Van Allen radiation belt
Most of the particles that form the belts are thought to come from solar wind and other particles by cosmic rays. By trapping the solar wind, the magnetic field deflects those energetic particles and protects the atmosphere from destruction.