A magnetometer is a device for measuring the direction and intensity of a magnetic field.
Magnetometers are widely used in geophysics and astrophysics. Oil prospecting and volcano monitoring are typical applications. Tectonic plate theory was largely supported at its beginnings by measurements of fossil and volcanic rock magnetism on ocean beds.
Planet probes also carry this type of device to study the magnetospheres of the planets.
Map of the crustal magnetic field of Mars made using a magnetometer.