Whether you're in a fairway or greenside bunker, you've put yourself in a position that requires a recovery. The most important thing to remember: Get back in play. Don't compound the situation.
Good players avoid disasters in the sand by using experience and sound technique. For example, they assess the color and texture of the sand (light means soft; dark means firm) as they step into the bunker. High-handicappers rack up the 7s and 8s because they fail to escape in one shot -- or they hit into more trouble. See below for my bunker tips.