Universities were a medieval invention. There was nothing like them in the ancient world. But in many ways what we think of as defining a university--a course of study in complicated intellectual issues, where one earned degrees--has been unchanged since the twelfth century.
Universities grew out of schools attached to churches, usually cathedrals. Men who wanted some sort of education but who did not want to go into the church could and did attend the same schools where cathedrals trained boys who would grow up to be priests. These schools attracted teachers who might, if they had an excellent reputation, attract students from all over Europe. Soon the schools, or at least the more advanced courses, were separated off from the cathedral schools to become universities, though the bishop generally felt he needed to keep an eye on them.
The names for many university officers, chancellor, provost, dean, are also the names of various officers in a medieval cathedral chapter. This is not an accident. Academic gowns still look like priests' robes. This is also not an accident.
The first officially recognized university was Bologna in Italy, which got its charter in 1100, but the most influential was the university of Paris. The modern Sorbonne (pictured above, the buildings are of course more recent) is the direct descendant of the medieval university of Paris. The area is still called the Latin Quarter because medieval students spoke Latin. It was both the language of instruction and a language that an international student body could all understand.
All universities offered a basic education leading to a "bachelor's" degree. This was based on late Roman educational models, where one started with the trivium (grammar, rhetoric, and logic) and proceeded to the quadrivium (arithmetic, astronomy, geometry, and music). These were the "liberal arts," those arts that one studied through books (a book is liber in Latin). Students studying for a Bachelor of Arts were younger than modern university students, being in their teens.
Different universities specialized in different advanced areas of study. Bologna was the center for law. Paris was the center for theology, the study of religion. Montpellier and Salerno focused on medicine. The two English universities, Oxford and Cambridge, both founded in the thirteenth century, did a little of everything.
After several years of advanced study, one could become a Master of Arts, the equivalent of being the master in a guild (professors were organized in guilds), qualified to teach the undergraduates. Few went on to a PhD, a "doctor of philosophy," a degree that one generally obtained only in one's forties, but which allowed one to teach the MA candidates. "Philosophy" was the general term to cover all branches of knowledge at a university.
In some ways medieval students were a lot like modern ones, drinking too much, writing home for more money, flirting, and finding intellectual pursuits very exciting, as their brains were taken seriously for the first time in their lives.
But in many ways they were different. First, universities were male-only. This is not surprising, given that they grew out of schools training priests, and only men could be priests. But this was not just a medieval phenomenon. American universities did not begin to admit women until the middle of the nineteenth century, when Oberlin was the first. Indeed, until very recently, it was thought that too much education would make women "unwomanly," unable to have children and unfit for their proper role as housekeepers, and that their brains couldn't handle complicated thoughts anyway.
Medieval universities also did not have courses of study in many things found in modern universities, such as engineering (a practical skill taught through apprenticeships rather than in classrooms), business, education, economics, or modern language and literature. Classical language and literature as well as history were however taught, as part of philosophy.