A compass needle works by aligning itself with the Earth's natural magnetic field. In almost all compasses, the north-pointing needle is marked, either with paint or by the shape of the needle itself. However, a compass needle is a delicate magnetic instrument, and it is possible for the poles to become reversed if the compass is brought into close contact with another magnet. If this happens, you will need to remagnetize the compass using a strong magnet.
The south pole of the magnet is the side your compass would normally be attracted to. If your compass has been demagnetized, it is the side of the magnet that repels the north-marked end of the needle.
While a more powerful magnet will certainly give your needle a more potent magnetic charge, be careful. It is possible for a very powerful magnet to bend a compass needle, damaging the instrument. Very powerful rare earth magnets should be used with caution.
Place the compass on a flat, stable surface facing upward.
Place the south pole of the magnet directly on top of the needle. Drag the magnet slowly along the length of the needle towards the north-marked end.
When you reach the edge of the compass, slide the magnet down the side of the compass. Pull the magnet away from the compass.