Doctor of Philosophy (Ph.D.) was originally a degree granted by a university to a learned individual who had achieved the approval of his peers and who had demonstrated a long and productive career in a learned field. The appelation of "Doctor" was usually awarded only when the individual was in middle age. It indicated a life dedicated to learning, to knowledge, and to the spread of knowledge.
Nowadays, the title Ph.D. is granted at the end of graduate school in the sciences and humanities. Some ability to carry out original research has to be documented by producing a dissertation, and defending it before a committee. The degree is a prerequisite for permanent employment as a university teacher or as a researcher in some sciences.
In some countries, the corresponding degree is simply called "Doctor", or "Doctor of Natural Sciences", "Doctor of Social Sciences" etc.