Many universities award honorary degrees, such as a honorary doctorate. These are not PhDs, but might still be relevant to your question. I have often seen these types of degrees being awarded to people that have contributed a lot to a scientific field from outside of academia (but sometimes for far less, also see this wiki-section on controversies over honorary titles), usually for work that has been connected to the awarding university. Since they are awarded for many different types of contributions, the formal criteria for when to award them is also relatively vague. In all cases I know of, they are also awarded based on external nominations, and not self-nomination. Finally, recipients should usually not use the PhD or Dr titles. An honorary doctorate definately do not carry the same academic weight as a PhD, but can sometimes still be valuable, especially if they are from a reputable institution. As an example, this page provides further information on how the title of honorary doctor is used in Sweden (in this case at Uppsala University).
Also note that besides "legitimate" honorary degrees from reputable universities, some fraudulent insititutions or diploma mills also use the same title for their degrees.