If you need to be away from the hustle and bustle of the airport transit area whilst waiting for your flight, then consider going to a lounge. A lounge is a section of the airport that the airport company, an airline or third-party company allocates for selected passengers to wait for their flight in slightly more comfortable conditions.
The exact features vary between lounge operators. In most cases, it will include complimentary refreshments, international newspapers, computer terminals, free wifi, and television. There may be also desk space and even conference rooms for those who need to get some work done. For passengers travelling long-haul, some lounges may offer access to showers. Some carriers have partitioned their lounges in such a way that there is an exclusive section for those flying in first class and their frequent flyers who hold the highest membership tier, which have even more features such as full meals.
Although lounge access is normally offered for departing passengers, some carriers may be able to offer such to arriving passengers on selected sectors (e.g. those on flights from New York to London).
Is it worth it?
Lounges run the gamut between barely there amenities and everything except water costing extra to lush temples of relaxation and getting done some work before a business flight with all imaginable luxuries available. There are often reviews by other travelers, which of course run into the same problems of subjectivity and paid positive reviews as do those for hotels and airlines in general. If you are flying first or business class and your ticket includes lounge access anyway, checking out the lounge can't hurt, but whether you should arrive at your initial departure airport early just to be able to spend more time in the lounge depends on your preferences as much as the quality of the lounge. Bear in mind that baggage drop-off often doesn't open until a few hours before departure (though some airlines offer to drop off your bag the evening before for a fee or as an added bonus for higher tiers of their frequent flier program or higher class tickets) and many lounges are past security. If you have a long connection, there is often the question whether you should go to a lounge (maybe even a pay-per-use one) or explore the city. If immigration prevents you from leaving the airport anyway and you have a layover of several hours, a lounge - even one on the expensive side - can "pay for itself" if there's included free WiFi, food drinks and so on which can get expensive if purchased otherwise at the airport.
To keep the lounge as comfortable as possible for its guests, a requirement to access it is that you need to be flying on a carrier's premium cabin, hold upper tier membership of a carrier's frequent flyer programme, or subscribe to a lounge access scheme.
Travel class-based admission
For international flights, if you booked in at least business class, it is highly likely that lounge access is already included in the fare you paid.
For domestic flights within the US however, having a first class ticket itself no longer entitles a passenger to lounge automatically. The exception is selected transcontinental flights which offer cabin service akin to what is seen on a long-haul international flight (e.g. flights between New York and Los Angeles).
Frequent flyer tier-based admission
Star Alliance Gold, One World Sapphire, and SkyTeam Elite Plus members get lounge access as one of their perks. Individual carriers may permit lounge access at the 2nd or 3rd tier level of their programme but for those who offer lounge access at the former, that privilege may not necessarily extend to flights with partner carriers. Moreover, passengers seeking lounge access based on their membership tier need to be flying with a participating carrier on the same day they are seeking access to the their lounge. For instance, if one only has Star Alliance Gold membership but holds a ticket for a flight to Cathay Pacific (a One World alliance member), then one will not be able to access the Star Alliance lounges for that day. You might be permitted to bring a "guest" but this (and the conditions of said guest admission) will vary from carrier to carrier and from lounge to lounge.
Paid and third-party-based admission
If passengers neither have a first/business class ticket nor a frequent flyer with elite tier membership, access to independent lounges may be available on a pay-per-use basis (often the admission price starts at US$40). Alternatively, one can subscribe to a lounge access scheme, and depending on the scheme taken out, either pay a discounted per-use rate, be allocated an annual allowance for access, or have unlimited lounge access for the duration of the subscription period. Priority Pass is one of the most widely known schemes for getting lounge access and offer fairly good coverage. However at some third party lounges, it is cheaper to buy access directly rather than through Priority Pass. In some cases, membership in Priority Pass and similar programmes could be complimentary to some premium credit card holders (this depends on whether your credit card issuer has chosen to partner with such companies).
US carriers do offer access to their US lounges on an annual membership basis. However, passengers need to hold a same-day ticket with the airline whose lounge they hold membership with.
Emirates offers pay-per-use admission to its lounges at Dubai International Airport starting at US$136.50 for non-Skywards members who travel in an economy class or business class special fare ticket.