A magnet has the ability to attract some materials because of the invisible magnetic field that extends around it. The traditional way to make the presence of the field visible, is to sprinkle iron filings onto a piece of card placed over a bar magnet. (This a is similar technique to releasing smoke particles into the air lin order to make air currents visible). The iron filings line up to show the pattern of the magnetic field, this is shown below.
Each iron particle becomes magnetised by the field. The particles then rotate, so that their north and south poles point in the direction in which they are most strongly attracted. This results in the iron filings forming lines within the magnetic field. These are called magnetic field lines. We imagine that these field lines exist, even when there are no particles within the field to form them. We assign a direction to the field lines and show them directed from the north pole to the south pole of the magnet. The diagrams below show the fields between two south poles, two north poles, and a north and south pole when reasonably close together.
The field lines can also be used to indicate the density of the magnetic field. Field lines drawn close together indicate a dense magnetic field.