Could you have sprained it? Is the leg red and hot? If so possible cellulitis or an infection.
Do you have varicose veins by chance? If so and your leg is hot to touch and the pain is real bad, I would ask a doctor about it, could be what I get. Phlebitis, warm compresses usually help me
it could be plaque in your arteries cause that is what i have when i walk for a period of time my legs gat swollen and feel so much pain please get that check