Children were coming out of school after the school day was over.
He reached school late, after school had started.
I don't really like the repetition of "school" in either of those though. I'd be a bit more imaginative:
At the end of the school day, children poured out through the doors/gates.
He arrived after school had started. He was very late!