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.