at school vs. in school

hello there
first thanks much for helping me for my poor English and all the lessons I am getting from you

I have one Question about ( In and At)
where is the different between In and At, when can I use In or At.

Example: At the park.
In the park

At school
In school

i think “at” used for time and in for place!! yeah?

Please read at school vs. in school.

Best regards,
Torsten[YSaerTTEW443543]

TOEIC short conversations: Making travel arrangements for Brisbane and Cairns[YSaerTTEW443543]