Blood will clot if it is not moving – thus anyone who does not or cannot move the legs much is at risk of the blood clots. Stroke patients, post-surgical patients or people who go on long haul flights (or other long-haul travel) are at an increased risk.
Venous blood may also not move from a narrowing of the main vein in the pelvis, reducing outflow of blood from the leg. This is typically seen on the left with significant leg swelling, but can occur on either side. It is known as the May Thurner Syndrome.
Blood usually thromboses to protect the body (such is in trauma). When blood clots, there is a complex enzyme system in place that causes the clotting. Some people may have a genetic condition affecting enzymes which cause clotting (or be deficient in enzymes that break up clots) and this may increase the chance of clotting.
Hormonal and other changes in blood parameters may also affect blood clotting and pregnancy, those taking exogenous hormones (oral contraceptive, hormone replacement therapy) and cancer patients are all considered to be procoagulable (promote clotting).
Lastly, dehydration or damage to a vein may result in clotting and thrombosis (such as having a central vein insertion or a dialysis catheter insertion). The body has a remarkable capacity to correct itself. Often, it is a combination of risks that eventually result in a DVT.