Depends on the specific type of doctor. But generally you're looking at:
4 yrs undergrad
4 yrs med school
Then residency/fellowship/etc. That's like minimum 3-ish years, but depending on the specialty it could be 7 or more years residency.
So you could easily be into your 30s before actually having a job.