[This is something that interested me a lot in the past. This is a genuine mystery and scientists really don't know how this works, and it becomes weird. The North Pole and South Pole can swop. This is known as pole reversal. It's kind of weird and scary. But it takes a long time. Jan]
Here's the video: