People use compasses to determine direction or their position relative to a fixed point. Long before global positioning satellite (GPS) technology provided instant navigational data on a digital display, the compass made it possible for early explorers on land and at sea to establish direction without reference to the sky.
Imagine that Earth has a giant bar magnet buried inside it. Magnets are pieces of iron that attract or repel other pieces of iron. Like all magnets, bar magnets have two poles -- one at each end -- and the magnetic forces are strongest at these poles. There are two kinds of magnetic poles, and opposite kinds attract, while similar kinds repel. These two kinds of magnetic poles are called north and south poles.
It turns out that Earth really is magnetized. Its core, made of solid iron, is surrounded by a hot, liquid iron layer. Heat radiating outward from the core, coupled with rotational forces in the liquid layer caused by the spinning of the earth, is believed to have generated a weak magnetic field around Earth's axis.
A compass is designed to detect this magnetic field. It consists of a small, lightweight magnet -- typically called a needle and marked "N" for north -- that balances on a friction-free pivot. The needle aligns itself so that one end points toward Earth's magnetic north pole. Because the magnetic field on Earth's surface is fairly weak, the needle must be lightweight and it's bearing of low friction.
Magnetic compasses indicate magnetic -- not true -- north because the imaginary bar magnet does not run exactly along Earth's rotational axis. It is skewed slightly off-center. This skew, called the declination, varies depending on where you are on the planet. Most good maps indicate what the declination is in different areas so that you can modify your positional or directional findings and properly orient yourself. If you look carefully at an atlas or detailed globe, you will find a point in northern Canada marked "magnetic north pole." This is the place your compass will point toward. Maps also show the magnetic south pole in Antarctica.