It is the Earth's magnetic field that protects us from the hazards of radiation contained within the solar winds which are emitted from the sun continuously, sometimes quite catastrophically. When solar winds collide with the Earth's magnetic field, there is a deflection of that wind which causes it to be diverted around our planet. The magnetosphere, a region formed and controlled by the magnetic field of a planet or astronomical object, forms in response to that diversion and therefore changes depending on the solar wind's speed and force. The shape of the magnetosphere over Earth and other planets changes in response to solar winds.

Solar winds fly outwards from the solar disc at great speeds and with great force. The shock wave from these supersonic winds changes in force and direction, causing the magnetic field to become compressed at the side of the planet closest to the source and elongating at the opposite side. Depending on the force and direction of the winds from the solar disc, the shape and size of the magnetosphere can and does change.

Disruptions in the magnetic field can produce undesirable effects. Among these are:

Communication disruptions

Radiation hazards to orbiting astronauts and spacecraft

Current surges in power lines

Orbital degradation

Corrosion in oil pipelines

Other planets also have magnetic fields, Jupiter's being the most massive within our solar system; but of all the rocky planets, Earth's appears to be the largest.

More Info: www.nasa.gov