In my course book "New Headway 3rd Addition " I have two sentences 1- We are in class 2- We are in the classroom. So, why don't we have the indefinite article "a" in the first sentence? What's the difference in meaning between these two sentences? Thank you for your help.

The article a/an is a determiner (NOT PARTICULAR), as defined by Cambridge Dictionary. There are many definitions but the first one will do. "Used before a noun to refer to a single thing or person that has not been mentioned before, especially when you are not referring to a particular thing or person."

In your example, "class 2" IS a particular thing or person; thing, in this case. Hence, it doesn't need the article "a".

"The" is also a determiner, but PARTICULAR, according to the same dictionary, "used before nouns to refer to particular things or people that have already been talked about or are already known or that are in a situation where it is clear what is happening". When someone says "We are in the classroom", the noun referred has already been mentioned or is already known.