Compression stockings gently squeeze your legs to move blood up your legs. This helps prevent leg swelling and, to a lesser extent, blood clots. If you have varicose veins, spider veins, or have just had surgery, your health care provider may prescribe compression stockings.