First of all, could we clarify that the correct spelling here is oPHthalmologist. Note the placement of the first "h".
Ophthalmologists are medical doctors (ie they have successfully graduated from medical school) and have then completed a residency program which usually runs 3 years (it may be 4 years depending on the jurisdiction). Most ophthalmologists will then complete a further fellowship which may last a year or 2, during which time they will specialize in treating either the front of the eye (an anterior segment specialist), or the back of the eye (retinal specialist). A further area of specialization is in the treatment of glaucoma.