Definition: The magnetosphere is the Earth's magnetic field; it is what gives us a North and South Pole which affect the magnetosphere itself. The magnetosphere affects charged particles by deflecting them from outside, like a shield. The charged particles come from the Sun, the Sun emits charged particles which surround the Earth, and which the Earth then deflects.
A compass's needle is attracted to the magnetic north pole, because of the magnetosphere.