Zài 在 has multiple functions in Chinese. One of its primary uses is as a preposition to show where something happens, similar to ‘at‘, ‘in‘, or ‘on‘ in English. In this context, the location must be placed after zài 在, and both zài 在 and the location precede the verb.
Structure
Basic form
Zài 在 and the location must come before the verb, so the place precedes the action. A simple way to remember this rule is: “You have to arrive at the place before the action can take place there.”

Negation
When you want to say an action is not performed at the place indicated by the prepositional phrase, the negation adverb is placed before zài 在.
Question
There are two ways to form a yes-no question. One way is to add the question particle ma 吗/嗎 at the end of the sentence.
Another way to form a yes-no question is by combining the affirmative and negative forms of the verb. The focus of the question is then on the action itself.
If the affirmative and negative forms of the preposition are combined into zài bu zài 在不在, the focus of the question is on the location.
To ask where something happens, use zài 在 + nǎr 哪儿/哪兒.
With modal verbs
Modal verbs, such as xiǎng 想 ‘to want’, precede the prepositional phrase with zài 在 when they refer to performing the action in the location specified by the prepositional phrase.
With adverbs
Adverbs, such as yě 也 ‘also’ and dōu 都 ‘both, all’ are usually placed before zài 在 and the location.
With time expressions
When a sentence includes a time expression, such as zuótiān 昨天 ’yesterday’ or xiànzài 现在/現在 ‘now’, the time expression comes before zài 在 and the location. Remember that most Chinese sentences follow the Time – Place – Action order.
Functions
Depending on the context the preposition zài 在 can mean ‘at’, ‘in’ or ‘on’.
1. Zài 在 as ‘at’
2. Zài 在 as ‘in’
3. Zài 在 as ‘on’
Also check zài 在 indicating existence/as a verb
Also check zài 在 as a complement
Also check The Progressive Aspect Marker zài 在
Also check Noun-localizer