So our Earth has a magnetic field that reaches far out into space. And we said that the magnetic field will push on charged particles that move in the field. But can it push on any old charged object that comes by? Well, only if our magnetic field is strong enough!
It just so happens that our Sun sends more than light to the Earth. Besides light, the sun sends tiny, little pieces of matter to the Earth. These pieces of matter are moving very fast when they come close to the earth. In fact, they are moving so fast that scientists call this the SOLAR WIND.
The solar wind "squashes" the earth's magnetic field. As you can see in the picture above, the magnetic field lines on the sun side of earth (left) are squashed and on the side of the earth away from the sun (right), the magnetic field lines are stretched out as if the wind is trying to blow them away.
Earth's magnetic field does a pretty good job of standing up to the solar wind. A great deal of the matter in the solar wind is pushed sideways around the earth by the earth's magnetic field. The magnet of the earth pushes these particles sideways so they don't hit the earth head on.