They are all correct, but they can imply slightly different meanings. Here are their most common implications:
I'm in school. (I am currently a student)
I'm in the school. (I am inside the school building)
I'm at school. (I am at the school during school hours)
I'm at the school. (I am at the school building)