The magnetic poles of the earth aren’t at the same locations as the geographic poles. For example, the magnetic north pole is located in the Arctic Ocean north of Canada at about 83 degrees north latitude and 114 west longitude instead of at 90 degrees north. Because the poles aren’t coincident, a magnetic compass needle does not point towards true north.
The compass needle angle east or west from true north is called the magnetic declination or declination for short. It changes depending on where you are on the earth’s surface. Most topographical maps will indicate the declination for the center or region(s) of the map. Declination values are also available on the Internet.
A freely moving compass needle or ball will align itself to point directly at the magnetic pole. So in addition to an offset east or west, it will also point in the direction through the earth to the magnetic pole location. This angle is called magnetic inclination (inclination for short) or magnetic dip. For the north end of the needle, inclination is down in the Northern Hemisphere and up in the Southern Hemisphere. It’s greatest right over the magnetic poles where the needle will be vertical.
Because a dipping needle can touch or stick to the compass dial, many compasses are balanced against the inclination. Most manufacturers will set the balance for one of five zones and sell compasses balanced for that zone. As examples, Zone 1 covers most of North America while Zone 5 covers Australia and New Zealand.
A compass direction can also be affected by the presence of large masses of magnetic ores or rocks, ships and close metallic objects like cars or steel in buildings.
(NOTE: declination as used by astronomers to measure celestial positions is a different concept not related to magnetism.)