The poles do not “switch”, just their magnetic polarity. Spinning with a large and dense iron core, the Earth is a gigantic electromagnet. The polarity of that magnet does migrate and then for some reason reverses. It’s been demonstrated by testing the polarity induced on ocean sediment deposits over hundreds of thousands of years. Did or could the last change destroy an ante-deluvian civilization, or cause a global flood? Since it’s showing signs of switching polarity again in the very (by geologic standards) near future we might find out.
The poles have moved 3 times according to some scientists.