The terms pupil and students are generally used to refer to some sets of people who are still under a particular learning process. The earlier stage of the two is actually the pupil learning stage. The pupil is a term that is used to refer to those that are still in the nursery and kindergarten.
However, that is not the end of it. The ones that are in the elementary stage in school are also referred to as pupils. Any stage after this learning stage, you can be referred to as a student. Students are generally in the secondary and tertiary stages of learning. At this stage, the students start gaining more freedom, and the learning process starts becoming flexible.
For pupils, learning is still kind of rigid at their stage, in the sense that they are closely monitored and most likely forced to learn. The teachers put them through every single process of learning and ensure they carry out the processes as due. The students, however, are expected to be matured enough to handle some learning processes, and they are less monitored.