Magnetic field
A magnetic field is a vector field that describes the magnetic influence of electrical currents and magnetized materials. In everyday life, the effects of magnetic fields are often seen in permanent magnets, which pull on magnetic materials (such as iron) and attract or repel other magnets. Magnetic fields surround and are created by magnetized material and by moving electric charges (electric currents) such as those used in electromagnets. Magnetic fields exert forces on nearby moving electrical charges and torques on nearby magnets. In addition, a magnetic field that varies with location exerts a force on magnetic materials. Both the strength and direction of a magnetic field varies with location. As such, it is an example of a vector field.
Earth's magnetic field
The global definition of the Earth's field is based on a mathematical model. If a line is drawn through the center of the Earth, parallel to the moment of the best-fitting magnetic dipole, the two positions where it intersects the Earth's surface are called the North and South geomagnetic poles. If the Earth's magnetic field were perfectly dipolar, the geomagnetic poles and magnetic dip poles would coincide and compasses would point towards them. However, the Earth's field has a significant non-dipolar contribution, so the poles do not coincide and compasses do not generally point at either.