One of the biggest problems one faces is sending back a dodgy bottle of wine in a restaurant. The posher the restaurant, the harder it seems to be, especially if there is a snotty nosed Sommelier hovering over you.
So you need to be confident and understand what it is you are supposed to be doing.
Presentation of the wine
First off, the waiter should show you the label to double check that it is indeed the wine you ordered off the menu. Beware! Some restaurants will not bother to update their menus and thus a 2000 Medoc that you ordered (an excellent vintage according to PV) may be substituted for a 2001 (good but not as good). Send it back if you are unhappy or choose something else!
Opening the wine
The waiter should then open the bottle in front of you. That way, you know you're getting a fresh bottle and not the dregs of the last few departed tables, passed off as your quality bottle of vino. If the waiter brings the bottle already opened then I would advise getting out of the restaurant, but by that point it is probably too late so you're stuck there.
Smelling the wine
Swirl the wine around the glass and take a deep sniff. You will be able to tell that the wine is off from the smell alone. The taste will merely confirm the matter.
If the wine is corked, then it will smell musty and dank, a bit like damp rolled up newspaper. Some people report a 'foxy' or 'earthy' unpleasant smell. Technically a 'corked' wine is one that has been spoilt by cork contaminated by "Trichloranisol" (otherwise known as TCA). To you, the wine will probably just smell 'wrong'.
Tasting the wine
Confirm your suspicions with a tentative sip. It is highly likely that the wine will taste like the wine you used to buy in your late teens and take to other peoples barbequeues. In other words, 'very rough'. Acid is probably the taste you'll be left with. In this case, don't be afraid to return the bottle and request a new one - any decent restaurant will be more than happy to oblige.
There have been reports in the past that one in ten bottles of wine can be corked so don't be surprised if it happens to you!