Every few hundred thousand years Earth's magnetic field dwindles almost to nothing for perhaps a century, then gradually reappears with the north and south poles flipped. This phenomenon is know as magnetic fields reversal.
Such reversals happen at intervals, ranging from tens of thousands to many millions of years, with an average interval of approximately 250,000 years. It is believed that this last occurred some 780,000 years ago, referred to as the Brunhes-Matuyama reversal.
The magnetic field deflects particle storms and cosmic rays from the sun, as well as even more energetic subatomic particles from deep space. Without magnetic protection, these particles would strike Earth's atmosphere, eroding the already beleaguered ozone layer.
At present, the overall geomagnetic field is becoming weaker at a rate which would, if it continues, cause the field to disappear, albeit temporarily, by about 3000-4000 AD. The rapid deterioration began at least 150 years ago and has accelerated in the past several years, with a total decrease of 10-15% over these 150 years.