Beer goes great with food - NO SHIT!
It's pretty straightforward, and I'm going to do this without pitting beer against wine, I'm not even going to mention wine!
Put simply beer has plenty of different ingredients, in that it has many opportunities to pick out, balance, quash or brighten the flavours in your food.
Check it out - malty flavours will balance rich flavours just like the bread they give you with your meal does. It will augment fruit flavours. Rather than fight against foody flavours malt joins up flavours - it is integral to the beer and food thing in that it provides a complete and continuous experience. Soft, sweet, bready and caramelised flavours just melt together and dance across your tongue because that's how your tongue works. Nothing goes beter with deep rich meats than a roubust beer with a strong malt presence.
Bitter or floral hops in beer will lift rich flavours and balance sweetness. Acidity, bitterness and pungency fill the mouth but don't dominate food, they ride alongside. They will balance hot flavours and moreover they are one of the only things other than milk that will quell very hot chilli. They will also cut through fat. Let it be known across the land that it is a travesty that you can't get IPA in curry houses - they are an unexploited market. The multitude of flavours that you find in hops can echo and counterbalance food flavours and provide an appetising bitterness that makes you want more.
Hops are the top note of beer and can go anywhere from extremely bitter to fruity to flowery to any combination of the three, the flowery and fruity flavours complement some subtler dishes like fish and chicken or salads. As a basic rule the stronger tasting the beer the stronger tasting food it will work with.
Fizz is usually provided from CO2 and CO2 is the one thing made when yeast works with sugar. The other is alcohol which is a pleasurably intoxicating thing. Fizz works with lighter, zestier flavours in beer and will lift fatty foods away from the palate, leaving it fresh for more. That yeast presence itself will provide flowery flavours if you're lucky and all sorts of high notes that work with a myriad of different types of food, the more pungent of yeast notes work especially well with cheese.
Most beer will match most food - the right beer will provide a contiguous experience that expands the flavours in both things. I'll be expanding on this theme in the coming months, in the meantime get drinking.