The region around a planet where a magnetic field is present and affects the behavior of charged particles.