A magnetometer is a device that measures magnetic field or magnetic dipole moment. Different types of magnetometers measure the direction, strength, or relative change of a magnetic field at a particular location. A compass is one such device, one that measures the direction of an ambient magnetic field, in this case, the Earth's magnetic field. Other magnetometers measure the magnetic dipole moment of a magnetic material such as a ferromagnet, for example by recording the effect of this magnetic dipole on the induced current in a coil.
Helium vector magnetometer (HVM) of the Pioneer 10 and 11 spacecraft
The Magnetometer experiment for the Juno orbiter for Juno can be seen here on the end of a boom. The spacecraft uses two fluxgate magnetometers. (see also Magnetometer (Juno))
The compass is a simple type of magnetometer.
Coast and Geodetic Survey Magnetometer No. 18
A magnetic field is a physical field that describes the magnetic influence on moving electric charges, electric currents, and magnetic materials. A moving charge in a magnetic field experiences a force perpendicular to its own velocity and to the magnetic field. A permanent magnet's magnetic field pulls on ferromagnetic materials such as iron, and attracts or repels other magnets. In addition, a nonuniform magnetic field exerts minuscule forces on "nonmagnetic" materials by three other magnetic effects: paramagnetism, diamagnetism, and antiferromagnetism, although these forces are usually so small they can only be detected by laboratory equipment. Magnetic fields surround magnetized materials, electric currents, and electric fields varying in time. Since both strength and direction of a magnetic field may vary with location, it is described mathematically by a function assigning a vector to each point of space, called a vector field.
A solenoid (electromagnet), a coil of wire with an electric current through it
One of the first drawings of a magnetic field, by René Descartes, 1644, showing the Earth attracting lodestones. It illustrated his theory that magnetism was caused by the circulation of tiny helical particles, "threaded parts", through threaded pores in magnets.
Hans Christian Ørsted, Der Geist in der Natur, 1854