A magnetic field is invisible, but it can be detected using a magnetic compass. A compass contains a small bar magnet on a pivot so that it can rotate. The compass needle points in the direction of the Earth's magnetic field, or the magnetic field of a magnet.
Magnetic fields can be mapped out using small plotting compasses:
The needle of a plotting compass points to the south pole of the magnet.
The behaviour of a compass shows that the Earth has a magnetic field. The Earth's core, which is made from iron and nickel, produces this magnetic field.
The diagram shows these key features: