A magnetic anomaly is a deviation in the Earth's magnetic field from the overall average expected for the area. Magnetic anomalies are most often attributed to differences in the composition of the lithosphere, the solid rock crust surrounding the Earth's molten core.
The Earth's overall magnetic field is caused by the rotation of the liquid outer core, made up of melted metal and rock. Generally, the main magnetic field overrides the magnetic field generated by the crust, but shorter magnetic wavelengths are able to escape this masking. Magnetic anomalies are caused in large part by minerals composed of magnetite and titanium in the crust. Above a certain pressure and temperature, these minerals are no longer magnetic, so the source of these anomalies is generally limited to the surface and 10 to 30 miles below.