Yes, pupils go to school, students are in further or higher education.

Technically I think "pupils" could be considered a sub-category of "students", but that's the usual distinction.