Glasses (also called spectacles) are lenses held in front of the eyes by frames made of metal or plastic in order to improve defective eyesight. Contact lenses work similarly but sit directly on the cornea of the wearer.
By the 23rd century advances in medical science had made the wearing of glasses very rare. Treatments like Retinax V were used to correct deficiencies in eyesight among humans. However, some people were allergic to such treatments. (Star Trek II: The Wrath of Khan)
Due to their unique evolution, many Efrosians were effectively blind away from their homeworld, and used special mechanical glasses to enable them to see in other environments. (Star Trek VI: The Undiscovered Country director's commentary, Star Trek: Titan novel: Sword of Damocles)