I'm in school: I'm attending school (I'm a student)
I'm in the school: I'm inside the school, I want to give you my location
I'm at school: this is what I'm doing right now. I'm at school, doing my thing at school.
In/at can be interchangeable sometimes but IN emphasizes the LOCATION, AT emphasizes the purpose/the reason why you're there.
For example if I say "I'm at the gym" I'm probably working out, if I say "I'm at school" I'm probably attending class, studying etc..