First you will need to get a Bachelors Degree (usually 4 years). You will need to complete several medical school prereqs, so it will be easiest if you major in something that has those prereqs built in, like Biology or Biochemistry (some colleges even have specially designed Premed majors). You will need to do very well in your college courses and maintain a very high GPA. Toward the end of your junior year, you will need to take the MCAT, and score very highly. Then during the summer before your senior year, you can apply to medical schools. Admission for medical schools can be anywhere from August of your senior year to June after you've graduated. Some waitlisted people even get their acceptance just days before medical school classes start, this is why you should apply as soon as the application opens, as admissions are rolling, meaning that they admit people even before the application deadline. The earlier you apply, the better your chances. If you get into medical school, you will then do two years of classroom study followed by two years of clinical rotations, where you will actually be working in hospitals and learning medical techniques, etc. During this time, you will need to choose what specialties you are interested in. Toward the end of your 4th year, you will interview and get matched (hopefully) into a residency program in your specialty of choice. These usually last 3-4 years. Residency might be followed by a fellowship if you wish to further specialize. In cardiology, for example, you may do a residency in Internal Medicine and then do a fellowship in Cardiology. These fellowships can be another 3-4 years. Once you're done with that, you will be on your own as a full-fledged physician.
Getting a PhD isn't really for working in the medical field, unless you are looking to do clinical research. PhD degrees can take 4-8 years on top of your Bachelors Degree (and possibly a Masters Degree) depending on what field you get the degree in. There are some people who get both degrees, MD and PhD. These people get a Bachelors and then do the first two years of medical school, they then put medical school on hold and complete their PhD (most are research-based). After they get their PhD, they go back and do the second two years of medical school.