In your legs, or lower extremities, you have a system of deep veins lying inside the muscles. When you walk or move your legs, the muscles pump blood from your leg back to your heart to circulate through your body.
You also have a surface vein system that allows for blood to be returned through connecting veins to the deep system. There are valves in these connecting veins that can malfunction and cause backpressure onto the skin.
Sometimes this backpressure can actually cause an ulcer to arise on the skin.