Both "pupil" the student in school and the pupil of the eye derive from the same Latin word, but took quite diverging paths. The Latin word was pupillus which meant "child", but specifically an orphan child, one who was under the care of a guardian. This is what the word meant when it first entered English. In Wycliffe's translation of the Bible in 1382, for instance, people are adjured to "visit pupils and widows in their tribulacioun". Two hundred years later, in Shakespeare's time, the word was being used to mean a university student; by the 19th century it came to be restricted to schoolchildren.
Meanwhile, the original Latin word was also developing along other lines. The feminine form was pupilla, which, as well as meaning "female child", also meant "doll". The Romans used this word for the opening in the iris because if you look into the pupils, tiny reflected images can be seen. The word didn't get borrowed into English in this sense till the 1500s; before that the pupil was called the "black of the eye", or the "sight" or "sight-hole", or, way back in Old English, "the apple of the eye". .The figurative use of "the apple of someone's eye" dates all the way back to King Alfred the Great's time.
Teachers will no doubt be entertained to learn that the word "student", defined in its first sense in the Oxford English Dictionary as "A person who is engaged in or addicted to study" ("addicted"??), is derived from the Latin word studēre (to be eager, zealous, or diligent at studying; to seek to be helpful). Although the language distinguished between students at university and pupils in lower education, starting in about 1900 in the US, the word "student" came to be used of all levels of instruction.
For the origin of the word "truant", see this post:
For the origin of the word "school", see this post:
Would you enjoy talking about words with Wordlady over many, many glasses of wine? Why not check out my trip to Bordeaux and Toulouse in July 2017. Unlike most of my Tours en l'air trips, this is more about food, wine, and sightseeing than about ballet (though there is some of that too). BOOKING NOW, SIGNUP DEADLINE SEPTEMBER 20. More info here:
P.S. If you find the English language fascinating, you might enjoy regular updates about English usage and word origins from Wordlady. Receive every new post delivered right to your inbox! SUBSCRIPTION IS FREE! You can either:
use the subscribe window at the top of this page
(if you are reading this on a mobile device): send me an email with the subject line SUBSCRIBE at firstname.lastname@example.org