In school indicates Enrollment.
At school indicates location and participation.
In the school, also indicates location, although more specific than at school.
"When I was in school, I learned very little."
"When I was at school, someone stole my bike."
"When I was in the school, unbeknownst to me, someone stole my bicycle."
"At school there was a fire drill."
(While I was in school attendance there was a fire drill.)
However you can't say, "In the school there was a fire drill."
(Fire drills do not take place totally within the walls of a school house.)
You can say, "In school today, we had a fire drill."
(While a student in the school we participated in a fire drill.)
"Damn Jim, you sure schooled him!" ROFL
(Schooled = taught in that sentence.)
The twisted TG-Fiction Author