At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga.
Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere possimus, omnis voluptas assumenda est, omnis dolor repellendus.
Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat.
When the earth was made of magma (the crost was so hot that all the stuff was melted), all the ferroid elements were oriented following the poles, once the crost had solidify they cannot change more they direction. So when we find rocks that doesnt follow the poles, we know that once they get solid they had mooved.
When rocks are formed, usually from lava flows, the magnetic orientation of them is set as they solidify. As these rocks are affected by continental drift and other factors such as earthquakes, the original magnetic orientation remains.
Using the known strengths of the earth's magnetic field over time, it is possible to then tell where these rocks originally emerged.