Without protection, the earth could not survive being in the presence of the sun. Through what are known as solar winds and flares the sun is constantly heaving the equivalent of 1 billion megatons of TNT at the earth. This can occur several times a day and without something to shield us our atmosphere would be ripped apart and earth would be scorched.
So why has Earth survived the sun's presence when planets like Mars have not? The earth’s iron core, which is over 10,000 degrees Fahrenheit, stirs its liquid outer core and when combined with the planet’s rotation, a magnetic field is generated. This field is the cause of the northern lights and the reason a compass points to the north. But more importantly, it acts as a shield against the charged particles flying at us from the sun that would rip apart our atmosphere and destroy life on earth.