Formal education was not a necessity for the overwhelming majority of people throughout much of the period. Far more important than academic learning was maximising the numbers of healthy bodies producing the goods needed to merely survive (primarily food, clothing and shelter). Work as a contributing member of the community commenced practically as soon as one was able to walk and follow simple instructions. Formal education is only able to be afforded in extremely affluent societies.
The first European medieval universities were established in Bologna (Italy) and Paris (France) in the Middle Ages for the study of law, medicine, and theology. Before that, similar institutions already existed in the Islamic world, notably in Cairo. The most important Asian university was Nalanda, in Bihar, India, where the second century Buddhist philosopher Nagarjuna was based.
Part of this article is based on a Wikipedia article at http://en.wikipedia.org/wiki/University.