"You are drinking a beer."
Translation:Du trinkst ein Bier.
True, "Bier" is neuter. But it's also the direct object of the sentence, so it's in the accusative. So basically you get the equation: Indefinite article + neuter + accusative = "ein".
See the complete table here: http://en.wikipedia.org/wiki/German_declension#Indefinite_article