The region around a magnet where a force acts on another magnet or on a magnetic material is called the magnetic field. The magnetic materials are iron, steel, cobalt and nickel. The force between a magnet and a magnetic material is always one of attraction. The field is strongest at the poles, and it gets weaker as the distance from the magnet increases.
The direction of the field at any point is the direction of the force that would act on a north pole placed at that point. Field lines therefore run from the north pole of a magnet to its south pole. Where the lines are closest together the field is strong, and near a bar magnet this is at its poles.
To plot the field pattern of a magnet, place the magnet on paper and put a small plotting compass next to it. Mark the position of the needle's two ends with dots, then move the compass so that its tail end sits on the last dot. Repeat this many times and join the dots to make a field line. Do this again from other starting points around the magnet.
A magnetic compass contains a small bar magnet, and its needle points along the direction of the Earth's magnetic field. A compass points north because the Earth has a magnetic field, which shows that the core of the Earth must be magnetic.