The earth's core contains a multitude of magnetic compounds including iron, cobalt, and nickle. These compounds, in conjunction with the outer core, produce a magnetic field. The process is called geodynamo, and is described as losely as the process by which the inner core and outer core form a convection current which in turn produces a magnatic field. The field extends out many miles past the earth's surface, and deflects the harmful radiation emitted from the sun. During solar flares and other events of intense radiation emmission the field is still able to protect us. The sun itself has extreme fluctuations in the amount to radiation that is emitted, and the magnetosphere protects us from these rays. If the magnetosphere were to weaken at any point, the repercussions could be devastating in the long run.