It goes through cycles naturally and from time to time the magnetic poles flip (it happens every few hundred thousand years). The magnetic field is largely created by the movement of molten iron and nickel in the earth's outer core. Wikipedia has a pretty good article on it.[0]
Biology appears to survive it but I'm curious what happens to our digital ecosystem when we lose a portion of our protection against charged particles.