At is used for an exact point or place.
- I am only fifteen, so I am still at school.
(Here we think of school as a place of education, not as a building.)
- When will you arrive at the office?
(Here we think of the office as a place of work, not as a building.)
In is used for inside an area or building.
- I have to be in school no later than 9.
(Here we think of school as a building.)
- Do you work in an office?
(Here with think of the office as an area inside a building.)