"Bois" is used for "je" and "tu", while "boit" is used for "il", "elle", and "on". It's similar to English: we use "drink" for "I" and "you", but we use "drinks" for "he" and "she".
More generally, just like in English, French verbs have conjugations, meaning they have different forms depending on what the subject is. You have to conjugate verbs correctly for the sentence to be correct. Again, to compare with English: "You drinks a beer" would be incorrect, you have to use "drink" instead of "drinks".
Open this link in your browser to see how conjugation works: https://www.thoughtco.com/introduction-to-french-verbs-1371059
I wrote the answer as " You drink a beer". But I am wondering how can we assume " You are drinking a beer", cant it be " You were drinking a beer". How can we figure out the tense in sentences like this? Thank you.
You should generally be able to figure out tense based on the verb conjugation. In this sentence, the verb is conjugated in the present tense. There are other lessons that go over other tenses, which use different conjugations. For instance:
Tu bois = "You drink" or "You are drinking" (present tense)
Tu as bu = "You drank" or "You have drunk" (passé composé)
Tu buvais = "You were drinking" or "You used to drink" (imperfect)
Tu boiras = "You will drink" (future)