PhD is a Doctor of Philosophy, MD is Doctor of Medicine although both are addressed by the title of Dr. A doctor of Medicine is trained to administer medical treatments to patients who come to her/him for help. A PhD can be obtained in many different fields including liberal arts and the sciences. PhD was originally an academic degree, and it still is. Some PhD's may offer various kinds of treatment to individuals (ie, Psychologists) but most non-medical PhD's are earned for academic and not for purposes of direct treatment of presenting issues.
The MD program focuses on courses to develop the knowledge of the students who are going to become practicing medical doctors. The PhD has a similar course requirement for the respective field of study; however the PhD program requires a PhD student to also provide a significant contribution back to their respective field of study also know as a dissertation or doctoral thesis. Basically this makes two classes of doctorates, the professional doctorates (MD, DO, etc.) and the research doctorates (PhD). Bluntly put the PhD has a higher status academically than any professional doctorate (MD, DO, etc.), however professional doctorate (MD, DO, etc.) are more applied the PhD's.