So what usually can cause swelling of the legs?

Leg swelling. There are many reasons to have leg swelling and it can involve one or both legs. This swelling can be due to underlying medical problems such as heart, lung, liver or kidney disease or it could be due to other problems such as lymphedema, venous insufficiency or venous clots. Infections and trauma can also lead to leg swelling. If you have swelling you should start with a leg venous ultrasound.
Many causes. Bilateral leg swelling has many causes spanning benign as well as serious explanations. Venous circulatory problems, salt overload, infection, medication side effects, hormonal effects, heart, liver and kidney disease can all be responsible.