Veins have one-way valves that ensure that blood keeps moving towards the heart but not in the opposite direction (like the check valves used in plumbing). These valves ensure that blood continues to flow in the right direction irrespective of whether you are standing, sitting, lying down or even standing on your head!
However with age and due to certain health conditions such as obesity and hormonal changes, these values become faulty. This results in pooling or accumulation of blood in certain areas (especially in veins near the skin) causing the veins to be distended and weakened. This is what causes varicose veins to develop (most often in the legs) and they can be mildly to moderately painful.
Symptoms include a dull, heavy aching or burning sensation, fatigue, and mild generalized swelling of the feet and ankles. If you have varicose veins with mild or no symptoms, keeping your legs elevated, doing mild exercises and keeping off caffiene and alcohol can help keep discomfort to the minimum.
If your discomfort is more, you may want to use compression stockings. Compression stockings, as their name implies, apply pressure on your legs and help blood flow better thereby alleviating many of the symptoms of varicose veins.
Compression stockings come in many sizes, lengths, types (with toe open, fully closed, …) and classes. Size is obviously S, M, L, XL, etc. based on the circumference of your leg at the ankle, calf (and thigh possibly). Choose the size based on the table given in the stocking box and not based on how easy it is to put on (if it is easy to wear, it is the wrong size for you).
Length is the length of the stockings and is usually upto below knee(AD), mid-thigh(AF), or groin(AG).
Class represents the level of pressure exerted by the stockings. Class-I stockings apply the least amount of pressure, usually measured in mmHg. Typical class-I stockings apply about 18 mmHg of pressure evenly.
There are also graduated stockings which apply maximum pressure at the bottom and gradually reducing pressure as it goes up the leg.
It is best to consult a doctor so that you can decide which is the right stocking for you.