Schools have been around for a long time. Archeologists have found schools dating from 2000 B.C. in the city of Ur, Abraham's hometown.
But a university is something different and more than a school. The world's first university began around the year 1088 A.D., in the city of Bologna, Italy. How and why did it start? The answer will take us a few centuries earlier, into the institutions of Medieval education.
Prior to the appearance of universities, the Middle Ages had three main educational institutions. The first of these was the cathedral school. Even the smallest villages had churches, but only larger towns and cities had cathedrals, which were organizational centers for church activity. One major function of the church in society at that time was record-keeping. Every birth, marriage, and death was carefully recorded; these were of personal interest to families, but also important legal records: they helped to determine who inherited which property. To keep these records, the institutional church across Europe needed a cadre of able scribes, people who could read and write well. Literacy rates back then weren't as high as they would be in some later centuries, so build this group of record-keepers, cathedral schools arose as a way of teaching reading and writing. Over a few centuries, this gradually contributing to an increase in literacy.
The second educational institution which existed prior to the universities was the monastery. Around Europe, monasteries formed the literary and intellectual backbone of the continent. They preserved the literary, historical, and philosophical wisdom of ancient Greece and Rome. They sharpened the academic discipline of learning the grammar of various languages: Hebrew, Greek, and Latin. A monk working in one of these monasteries would become familiar with a long list of major texts: Socrates, Plato, Aristotle, Thucydides, Cicero, Virgil, Homer, Marcus Aurelius, and many others. It is important to note that the one missing piece in the early Middle Ages was a portion of Aristotle's works. Monasteries at that time had most, but not all, of Aristotle's books. When Europe received the missing pieces of Aristotle in the High Middle Ages, it further energized intellectual life in the monasteries and later in the universities. The monasteries were also the source of commentaries: the monks had become experts in the texts of Greece and Rome - they had, after all, copied them by hand, and learned Greek and Latin grammar to a refined degree - and began to write commentaries and interpretations of them. They also began to pose sharp questions about philosophical issues. The monks learned to read, understand, and analyze various languages and grammars. This ability to do 'close reading' will be the intellectual spark which lights the fire of the universities.
Finally, law schools arose as the third major educational institution prior to the university. With the end of the Western Roman Empire in 476 A.D., there began an erosion of systematized legal thought. The first few centuries of the Early Middle Ages were dominated by local feudal lords, who often acted as judges in various matters, but without the benefit of a law code or standardized legal processes. As the Middle Ages progressed, Charlemagne formed a large empire, which in turn required a formalized legal system. Charlemagne was, of course, known as 'Karl der Grosse' or 'Karl the Great' in his own era; the name 'Charlemagne' was applied to him only by certain historians who wrote in Latin, not in Frankish, the Germanic dialect which he spoke. The rise of laws schools - part of the Carolingian Renaissance - began with the study of the laws of Rome's republic and empire. Since Karl was forming a similar empire of his own, he reasonably thought that he could model his laws of those of Rome; when Karl was crowned in 800 A.D., there hadn't been a major empire since Rome fell. The law schools fostered, first, the careful reading of Roman legal texts, second, the careful analysis, evaluation, and discussion of them, and third, the debate about which changes were necessary to update Roman law for an empire operating four centuries later.
These three educational institutions - the cathedral school, the monastery, and the law school - created a vibrant intellectual atmosphere in the Middle Ages, and set the stage for the birth of the university. In fact, the university could be interpreted as the merger of these three institutions.
Bologna, Italy, was the first city to create a university. The exact date is unclear, but we know that Bologna's university existed by 1088 A.D. at the latest. The name 'university' comes from the Latin phrase studium generale - general studies. (General studies included the study of everything, i.e., universal studies.) The structure of Bologna's university was loose, compared to modern standards. There was a 'school of the arts' into which most students first entered. The prerequisite was that one could prove mastery of the Latin language - 'mastery' construed as a reasonably large vocabulary and a basic knowledge of general. Once admitted, a student worked at the first level: the 'trivium' - studying grammar, rhetoric, and logic. Upon demonstrating mastery - the word 'mastery' is used often here, and led to the modern "Master's Degree" and complemented the use of the Latin magister for those who taught in the university - a student advanced to the second level, called 'quadrivium' and consisting of arithmetic, geometry, astronomy, and music. Seeing music nestled among mathematics and observational physics (which is astronomy) gives us a clue about why Medieval music is often called "objective" in contrast to "subjective" form into which music decayed in the Renaissance era: for the Medievals, music was treated mathematically - the study of intervals and rhythms. Upon completed this second level, students could proceed, if they wished, into professional schools: law and medicine. There was no fixed timetable for progression through this system; a student attended lectures and studied until he felt ready to take an exam. If the student did well in the exam, he moved on to the next level; if he didn't, he stayed at the lower level a while longer and took the exam again.