How magnetometry works
There are many better descriptions of how magnetometry works and even how to build your own (check out some of the links below), so this is just a rough and ready overview.
Basically the earth has quite a strong magnetic field, which is why a magnetic compass works, but it is locally distorted by magnetic materials and electrical fields. The main magnetic material we come across is iron. Not only in tools, weapons and decoration but also horseshoes, bits of plough, nuts and bolts, fences and cars. Electrical fields come mainly from houses, powerlines and in some places trains.
From an archaeological perspective there are two other sources of magnetic field distortion; burnt material such as hearths, kilns and bricks and decomposing organic material. If two very sensitive magnetic field detectors are placed above each other, they both detect the earth's magnetic field but the lower one also detects the effect of the distortion of that field caused by material in the ground. By recording the difference between the two detectors you thereby record the effect of the material in the ground. The strength of the recorded signal depends on the amount of magnetic effect the material has and its distance from the detector.
The crucial step in doing a magnetometry survey is setting up the equipment so that the two sensors are carefully balanced against each other, however you are orientated to the earth's magnetic field. Trying to carry out a magnetometry survey near iron based fencing, houses or powerlines is likely to produce large amounts of meaningless data. As with resistivity, at the end of the day if you record this difference in signal over a lot of points in a surveyed area, you end up with a grid of numbers which can be converted to shades of grey to bring out any patterns such as ditches across the site.
Everything about Magnetometers
Seeing beneath the Soil, Anthony Clark, Batsford, London 2001
Revealing the Buried Past, Chris Gaffney and John Gater, Tempus, Stroud 2004
Archaeological Prospecting and Remote Sensing, I Scollar, Cambridge University Press, Cambridge 1990