A compass is a navigational instrument used to determine direction relative to the Earth's magnetic poles. It typically consists of a magnetized needle or dial that is mounted on a base or enclosed in a housing, and its primary purpose is to show the user which way is north.