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.
Some people may become confused between pupils and students because they are not exactly sure if these words mean the same thing. One thing that you should realize is that the word pupil usually refers to someone who is still young while a student is someone who may be a bit older.
This means that if you would say that you are a student, you may already be enrolled in a university or a college. Up until you are in secondary education, you may be considered as a pupil. Yet, there are also some schools that can use these two terms interchangeably probably because there is not much difference between the two.