A bar magnet can be used to create a compass in order to find the west direction.
A compass is an instrument that is used to find direction. A compass is created by placing a lightweight magnet on a nearly frictionless pivot point. The magnet is generally called a needle. One end of the needle is often marked "N," for north, or colored in some way to indicate that it points toward north. West would be the direction that is perpendicular and to the left of the North needle.
A compass works because Earth is thought to have a gigantic bar magnet buried inside. Opposite poles of a magnet attract to one another; much like opposite charges of an atom attract to one another. Therefore, in order for the north end of the compass to point toward the North Pole, it is thought that Earth's buried bar magnet has its south end at the North Pole.