A compass is one of those pieces of gear that is critically vital in an environment where getting lost is a reality. Talking about compasses could be quite a lengthy and in depth conversation - one which you won't find here as others have covered it far more effectively.
Oddly enough, a compass is only somewhat useful in the areas I hike due to the extensive tree canopy and lack of observable land features. As a result, I have absolutely no need for a high-dollar compass capable of not only telling me direction, but making me breakfast.
With that said though, that doesn't mean I'd ever leave a compass at home. For example, the Appalachian Trail is a north/south trail. A running joke of AT thru-hikers when getting up in the morning is the silly question of "what direction are you heading today" as the choice is painfully obvious. Still many get lost on the AT and surrounding trails, not because the trail isn't well marked, but because side trails often aren't as well marked and trips into the woods quickly help any sign of a trail or direction disappear.
For as well marked as the AT is, I've honestly almost gotten lost several times. These situations have all occurred after a trip into a densely forested area to look for water, a bathroom area, or a stealth area to set up camp. Unless the ground is perfectly level, which it rarely is, I can walk a couple dozen feet into the forest only to turn around and find that the trail is completely gone from my perspective. Trust me when I say not immediately seeing the trail is unsettling.
To ensure I'm not the next SAR rescuee paraded around on a local newspaper, I generally do two things to ensure my direction. First, and something that works well on the AT, I take a quick look at a button compass I carry and ensure I fully appreciate the direction I'm heading. When I get to where I'm going, especially if I'm staying the night, I often arrange some sticks or stones to point me in the direction out. This may be vital if needing to make a quick escape in the middle of the night from any number of potential issues.
Although some may genuinely need a full-scale compass, a button compass is something I have found to be ideal for my needs. It is smaller than a penny, weighs virtually nothing, and is quite accurate. I like the Mini Tracker Survival Buttom Compass from Best Glide Aviation Survival Equipment (http://www.bestglide.com/). It is a NATO approved liquid-filled compass also endorsed by the Boy Scouts of America. It comes in a 14mm and 20mm size and functions from -20f to 120f and is water resistant to 30 ft. At less than $3, it's one of those pieces of gear which really should never be left home. I carry it regardless even though my Suunto Core watch has a compass built into it, which as I learned about a month after purchasing the watch, the digital compass can be quite wrong.
I always carry a whistle around my neck and I found that adding a button compass to it with some Super Glue makes the compass perfectly available, out of the way, and handy - plenty easy for a quick glance without fumbling through my pack or pocket. On a side note, Super Glue is amazing stuff. Although I usually purchase several button compasses at a time, I recently tried to get one of the compasses off a whistle to relocate it to something else. Bottom line - it wasn't moving, so feel plenty confident in a little glue.