Re: I don't understand how, please explain
You can measure magnetic variation non-invasively. In archaeology we use handheld magnetic gradiometers which we cart around fields a few cm above the ground, and measure in the tenths of a nano Tesla. I know that people take magnetometers up in aeroplanes to measure the strength of the geological magnetic field when prospecting for oil, but they measure at many orders of magnitude coarser then archaeologists.
And yes, it is possible to compare the current magnetic field with that which is "locked" into rock when it cooled, and run that through models to give an appropriate age. I must admit though, 10s of km altitude is quite impressive for these sort of techniques. Although archaeologists often use equipment older than the stuff they're looking for...