The veins in your leg, both in the deep and in the surface system, have valves that allow for one-way blood flow.
The blood in your feet is intended to return to your heart to be recirculated through your lungs. In order for the blood not to stay in your legs, a system of valves allows for the blood to be moved from 1 level up to another level.
That is, the blood is moved up to your knee and then up to your hips and should not flow back down.
If the valves are not working correctly, the blood can flow back down and the leg can swell. This can lead to pain and the development of large veins on the surface of the legs.