For instance you shouldn't use them if you have nerve damage in your legs or another condition that affects skin sensation, peripheral arterial disease, a history of a peripheral arterial bypass grafting, a skin infection on your feet or legs, dermatitis with oozing or fragile skin, massive leg swelling, or a pulmonary edema from congestive heart failure.
Also, compression socks need to be correctly fitted. I was given some when I was about to have an operation in hospital. Someone came and measured my legs very carefully, before arriving with the right socks for me, personally. You can't just go and buy any old socks.