Universities started to be set up in Europe in the 12th and 13th centuries. Teaching in universities was only carried out by people who were properly qualified, as with other professions - or guilds: faculties in universities were organised as guilds. In the same way that a carpenter would attain the guild status of a "master carpenter" when fully qualified, a teacher would become a "master" when he had been licensed by his profession - the teaching guild.
A degree was a step on the way to becoming a master, and therefore a qualified teacher. "Graduate" is based on the Latin word "gradus" for a step - it was a step on the way to becoming qualified. Originally the only qualification was the master's degree: the bachelor's degree only marked the completion of a stage in the training. It was awarded to a candidate who had studied the prescribed texts in the trivium (grammar, rhetoric and logic) for three or four years and had successfully passed examinations held by his masters.
Today the terms master, doctor and professor signify different levels of academic achievement, but initially were equivalent terms. The University of Bologna in Italy, regarded as the oldest university in Europe, was the first institution to award the degree of doctor in civil law in the late 12th century, and awarded similar degrees in other subjects including medicine. (It is interesting to note that it is only in medicine that the term "doctor" is still used by students who have obtained their first academic qualification - a throwback to these times.)
Other universities went down a different line. The University of Paris used the term "master" for its graduates, and the English universities of Oxford and Cambridge adopted the Parisian system.
The practice developed along these lines, and became linked with the subjects studied. Scholars in the faculties of arts or grammar became known as masters, but those in philosophy, medicine and law were known as doctor. As study in the arts or in grammar was a necessary prerequisite to study in subjects such as philosophy, medicine and law, the degree of doctor assumed a higher status than the master's degree. The hierarchy that we know today - the Doctor of Philosophy (Ph.D) degree being more advanced than the Master of Arts (M.A.) degree - was being developed. The German universities developed the practice of using the term "doctor" for all advanced degrees, and this usage spread across the academic world.
The French system and terminology shows very strong links with the past and the original meaning of the academic terms. The baccalauréat ( cf. "bachelor" ) is conferred upon French students who have successfully completed secondary studies and admits the student to the university. When students qualify from university, they are awarded "licence", - very much as the medieval teaching guilds would have done, and the students are qualified to teach in secondary schools or to go on to higher-level studies.
In Germany, the doctorate is still the only higher degree granted, but with additions to specify the area of study - such as Dr.rer.nat. (Doktor rerum naturalium) in natural sciences and Dr.Ing. (Doktor-Ingenieur) in engineering.
In Europe, degrees are being harmonised through the Bologna process. This is based on a three-level hierarchy of degrees (Bachelor:Master:Doctor), which is currently being introduced in those countries that currently only have two stages.
Types of degree (with examples):
The distinction of "higher doctorates" is not very common in the United States. The U.S. Department of Education and the U.S. National Science Foundation (NSF) recognize numerous doctoral degrees as equivalent in status and do not discriminate betweem them. See: D.A, D.B.A, D.M.A, D.Sc, Ed.D, Ph.D, Th.D, and more at doctorate.