In general AT works best. I'm at school, I'm at work, I'm at the dentist, at the airport.
I'd only use IN if I want to be specific. "I am in the office, in the dentist's surgery, in the school. in the airport (NOT in the car park/canteen).
So for a general comment about studying... I'd use AT school.