The main rule to remember about pairing wine with food is that there are no rules: you should drink the wines you like with the foods you like. That being said, there are some basic guidelines that can help you maximize your enjoyment of wine-food pairing.
Match the weight & texture of the food to the weight & texture of the wine
Example: A light-bodied fish like sole works best with a light-bodied white wine like pinot grigio, while a heavier-bodied fish like salmon calls for a richer, fuller-bodied white like chardonnay.
Balance the intensity of flavours in the food and wine
Example: A mildly flavoured food like roast turkey pairs well with light-bodied white and red wines like sauvignon blanc and Beaujolais, but in the context of a Thanksgiving dinner featuring stuffing, cranberry sauce, and other strongly flavoured side dishes, an intensely flavoured white like gewürztraminer or a rich, fruity red like syrah or zinfandel would be preferable.
The five basic tastes are sweet, sour, salt, bitter and umami (the recently discovered fifth taste found in savory foods like mushrooms, tomatoes, soy sauce, and aged cheeses and meats). Salty and sour tastes in food make wines taste milder (fruitier and less acidic), while sweet and savory (umami) tastes make wines taste stronger (drier and more astringent).
Flavours are combinations of tastes and aromas, and there are an infinite number of them. You can fine-tune food and wine pairings by matching flavours in the food and the wine.
Sometimes, the best choice is to counterpoint flavours rather than matching them.
Read more on drinkwine.com