The practice of pairing finds harmony between flavour, texture, aroma and intensity.
Things to consider:
Acidity - foods high in acid make wines lower in acid taste flat. Imagine taking a bit of an apple, you'd want a high acid wine to match.
Richness - high tannic wines can act as palate cleansers to fatty, rich proteins, think of a Malbec with steak.
Spiciness - the burn of a spicy curry can be counteracted by a cold sweet wine, lower in alcohol
Pungency - wines with higher acidity and sweetness match pungent flavours, try strong cheeses like Gorgonzola with sweeter wines.
Bitterness - bitter tannins are magnified by bitter foods. Try bitter veg and salad with wines low in tannin.
Sweetness - sweet foods will make dry wines taste bitter, this is why dessert wines are so popular
if there is one thing to remember then think about balancing the intensity of flavour. Intense wines need intense flavoured food, you don't want one to overpower the other.