Wine is not only something to enjoy as an accompaniment to a meal, it's also a key ingredient in classic dishes such as coq au vin, boeuf bourguignon and sabayon (zabaglione), and it is used as subtle flavouring in many more. You can cook with most wines including the fortified varieties such as port, Madeira and Marsala, which are good in sweet and savoury dishes. Champagne and sweet wines are delicious and extravagant in desserts such as champagne sorbet or Sauternes sabayon.
The rule when cooking with wine is not to use anything that would be undrinkable on its own because any bad qualities will be enhanced. This isn't as important when you're using 100 ml or so in a dish but it's essential if wine is a main ingredient. I made the mistake once of not tasting a red wine before braising duck legs in it; the resulting dish was so awful we ended up ordering pizza. But it's a waste to cook with an expensive bottle of wine because any exceptional qualities will dissipate when heated, and the other ingredients will mask the wine's nuances. Use a well-balanced wine that's not too acidic, sweet or tannic.
To make a marinade for grilled meats, mix olive oil with white or red wine, garlic and herbs (thyme, rosemary and oregano work well with most meats). Rub the mixture into the meat and let it sit in the fridge - a few hours for chops or overnight for larger cuts and roasts. Salt and pepper the meat just before cooking. For steaks, I like to use a mixture of soy sauce, Chinese rice wine, garlic and ginger. Marinate steaks for only two hours or they'll be too salty.
Pears poached in wine is a classic dessert. Pour a bottle of red wine in a deep pan and add 250ml water and 250 grams of sugar. Add your choice of flavourings - vanilla bean (split it lengthwise and scrape out the seeds; put the seeds and bean into the pot), long strips of lemon or orange zest, a cinnamon stick, star anise or a couple of whole cloves. Stir to dissolve the sugar and simmer over a low heat. Peel slightly under-ripe pears, cut them in half lengthwise and remove the cores. Put the pears into the wine mixture and poach gently over a low heat until tender but not mushy. Let the pears cool in the wine then carefully remove from the pot with a slotted spoon. Cover the pears with plastic wrap and refrigerate. Strain the wine and discard the solids. Heat the liquid and simmer to reduce until it's a light syrup. Drizzle the red wine reduction over the chilled pears and serve with biscotti or amaretti biscuits.