Magnetic Field Line
The magnetic filed of a magnet is represented by the magnetic field line. The magnetic field line flowing out from the North pole and flowing into the South pole.

Compass in a magnetic Field

The pattern and the direction of a magnetic field can be determined by a compass. The pointer of the compass is always in the direction of the magnetic field. In figure (b) above, we can see that when a few compasses are put near to a bar magnet, the pointer of the compasses are all in the direction of the magnetic field.
If a compass is placed near to a current carrying wire, the pointer of the compass will point along the direction of the magnetic field generated by the current. This will discuss in electromagnetism.