In some cases, the is left out when we talk about things in general or when we use a building or place for its specific purpose.
I am in prison (you are serving time).
I am at school (you are a student there).
I am at the prison (you are visiting someone).
I am at the school (you are just visiting).