Ophthalmologists are medical doctors (MDs or DOs) who specialize in eye care. Not only do they prescribe eyeglasses and contacts, they also perform eye surgery and treat medical conditions of the eye.
Optometrists have a Doctor of Optometry (OD) degree. They diagnose vision problems and treat medical conditions of the eye, prescribe glasses and contacts, etc. With a few exceptions, optometrists typically are not trained or licensed to perform eye surgery.
Opticians are eye care professionals who fit, adjust and repair glasses and teach patients how to apply and care for contact lenses.