An optometrist (OD) examines eyes for both vision and health problems, prescribes glasses, and fits contact lenses. Optometrists prescribe many ophthalmic medications and may participate in your pre- and postoperative care if you have eye surgery. An optometrist must complete four years of post-graduate optometry school.
An ophthalmologist (MD) is a medical doctor who specializes in the eye. They perform eye exams, treat disease, prescribe medication, and perform surgery. They may also write prescriptions for eyeglasses and contact lenses.
An optician is not a doctor, but in some states they must complete training and be licensed. And in some states they can become certified, after special training, to fit contact lenses. Most opticians sell and fit eyeglasses, sunglasses, and specialty eyewear that are made to an optometrist's or ophthalmologist's prescription.
Since the prevention of blindness is so important, any visual changes, problems or eye pain of unknown origin should be investigated by a doctor who specializes in the human eye.