We know that the poles had changed positions in the past, because of the arrangement of the crystals in the rocks made out of metal. The crystals of the metals act like the needle of the compass when the rock is cooling off and forming, they turn into the direction of the strongest magnetic field on the Earth, which is the North Pole. So by studying the rocks that are made out of metals and see the crystals arrangement and also estimate the age of the rocks, the scientist can precisely tell how has the North Pole been moving throughout time.