Earth’s magnetic field is weakening, but the exact reason why is poorly understood. However, this is no cause for concern; records suggest the magnetic field frequently, relatively speaking, decreases and increases in intensity. Since German mathematician Carl Friedrich Gauss first measured it in 1845 it has dropped about 10%.
If the magnetic field drops significantly further, there is a chance the magnetic field could flip. Contrary to popular belief, however, this will not signify the end of the world. The magnetic field has been known to flip several times in the last million years alone, and life has survived. It’s unlikely a flip would cause any devastating effects.
The only true danger is if the magnetic field were to disappear completely. As long as Earth has a liquid core, though, it will continue to have a magnetic field. If you’re still around in a few billion years when such an event could occur, you haven’t got much to worry about.