From Wikipedia ...
http://en.wikipedia.org/wiki/Compass#How_a_magnetic_compass_works
How a magnetic compass works
A compass functions as a pointer to "magnetic north" because the magnetized needle at its heart aligns itself with the lines of the Earth's magnetic field. The magnetic field exerts a torque on the needle, pulling one end or pole of the needle toward the Earth's North magnetic pole, and the other toward the South magnetic pole. The needle is mounted on a low-friction pivot point, in better compasses a jewel bearing, so it can turn easily. When the compass is held level, the needle turns until, after a few seconds to allow oscillations to die out, one end points toward the North magnetic pole.
A magnet or compass needle's "north" pole is defined as the one which is attracted to the North magnetic pole of the Earth, in northern Canada. Since opposite poles attract ("north" to "south") the North magnetic pole of the Earth is actually the south pole of the Earth's magnetic field.[7][8][9] The compass needle's north pole is always marked in some way: with a distinctive color, luminous paint, or an arrowhead.
Instead of a needle, professional compasses usually have bar magnets glued to the underside of a disk pivoted in the center so it can turn, called a "compass card", with the cardinal points and degrees marked on it. Better compasses are "liquid-filled"; the chamber containing the needle or disk is filled with a liquid whose purpose is to damp the oscillations of the needle so it will settle down to point to North more quickly, and also to protect the needle or disk from shock.
In navigation, directions on maps are expressed with reference to geographical or true north, the direction toward the Geographical North Pole, the rotation axis of the Earth. Since the Earth's magnetic poles are near, but are not at the same locations as its geographic poles, a compass does not point to true north. The direction a compass points is called magnetic north, the direction of the North magnetic pole, located in northeastern Canada. Depending on where the compass is located on the surface of the Earth the angle between true north and magnetic north, called magnetic declination can vary widely, increasing the farther one is from the prime meridian of the Earth's magnetic field. The local magnetic declination is given on most maps, to allow the map to be oriented with a compass parallel to true north.
In geographic regions near the magnetic poles, in northeastern Canada and Antarctica, variations in the Earth's magnetic field cause magnetic compasses to have such large errors that they are useless, so other instruments must be used for navigation.