A plotting compass is a small magnet, called the needle, that is free to turn. The needle lines up with the magnetic field it is in. The north pole of the needle points in the direction of the field, so a compass shows the direction of the field at that point.
To plot the field of a bar magnet, place the magnet on a sheet of paper and put the compass near one pole. Mark a dot at each end of the needle. Move the compass so that the tail end of the needle sits on the dot made by the head end, then mark a new dot at the other end. Repeat this until you reach the other pole of the magnet. Join the dots with a smooth line and add an arrow in the direction the north pole of the needle points, which is from the north pole of the magnet to its south pole. Start again from a different point to plot more lines and show the shape of the field.
The same compass can be used to show the field of the Earth. Far from any magnets or magnetic metals, a compass needle lines up with the Earth's magnetic field and points roughly north. This shows the Earth's field has a direction, like the field of a bar magnet.