There are a number of techniques for getting rid of and avoiding spots on glassware, but it helps to understand what is causing the spots first. The most common cause of spots on glassware is hard water, water which has a high percentage of dissolved minerals which can leave white or crusty deposits on glassware. If you have hard water, you may also have noticed problems with your haircare, or frequently clogged showerheads. Spots can also be caused by improper rinsing or excessive use of detergent.
In both cases, wash and rinse glassware on the highest possible temperature setting and rinse your dishware well to avoid spots. If you are washing dishes by hand, wash glassware first while the water is still very hot, and wear gloves to protect your hands. Follow a wash with a hand drying using a soft, clean cloth. In a dishwasher, you may want to consider running a separate all glass load occasionally with a high temperature setting to cut down on filmy buildup.
You should also cut down on the detergent. Detergent can leave a filmy residue or spots on glassware which may build up so much that it becomes permanent. If you can stand the thought, don't use any detergent at all; rely on the heat of the washing to remove bacteria and detritus. If you must use detergent, be sparing, and rinse twice to make sure that all of the detergent has been removed. In addition to preventing spots on glassware, this will also remove traces of residue which might otherwise flavor your food. A vinegar rinse can help to loosen and remove spots which have accumulated on your dishware.
If you use a dishwasher, there are a number of tricks for removing the spots on glassware, as well as preventing them. If you have spotty glassware, fill the dishwasher and run it through a wash cycle with bleach, but don't allow the dishes to dry. Follow the rinse cycle with another wash, using vinegar instead and allowing the dishes to dry this time. This will cut through the spots and film to leave your glassware clean again, and it will also clean out your dishwasher.
If you live in a region with hard water, consider purchasing a dishwashing detergent which is specially formulated for hard water, or an additive for your dishwasher which will help cut hard water. You can also make your own additive mixture with two parts borax to one part sodium bicarbonate; add a teaspoon of this mixture to every wash load. Be careful if you handle borax, since it can be a skin irritant and it is toxic in large enough quantities.