We can trace the magnetic field pattern of a bar magnet in the following two ways:
1. Using iron filings: In this process, iron filings show the shape of magnetic field produced by a bar magnet by aligning with magnetic field lines.
2. Using a compass: With the movement of compass from one position to other, magnetic field lines leave the north pole of the magnet and enter the south pole.