You are describing an ophthalmologist also described as an "eye surgeon" colloquially. This pathway requires 4 years of college + (MCAT) + 4 years medical school + 1 year internship + 3 years residency.
An optometrist is also described as an "eye doctor" colloquially. This pathway requires 3 or 4 years of college + (OAT) + 4 years of optometry school.