He lived the life of a normal insect until he crawled into a country schoolhouse (presumably somewhere in the Winkie Country of the Land of Oz) and listened to the lessons and lectures the famous Professor Nowitall gave his pupils for about three years.