To become an Ophthalmologist, one must become a physician (8 years after high school), and land a residency in Ophthalmology, which requires very good grades in medical school and high board scores, and frequently research experience in Ophthalmology. All Ophthalmology residencies require the completion of a separate accredited internship year prior to beginning Ophthalmology residency, which is 3 years in length (4 more years total). After finishing residency, there are several fellowships available for Ophthalmology, all of which add more years of training to your 12 years after high school.
As you can see, you may spend 12 or more years in training to become an Ophthalmologist.