A compass was an instrument used to determine direction on a planetary surface relative to that world's magnetic poles.
History and specifications
As a young boy, Jean-Luc Picard was given a compass by his father as a birthday present. Picard had nearly lost it during a minor sailing accident, but his father was able to loop it around his neck while the two swam to shore. (TNG comic: "The Gift")