The information provided is quite limited. Which part of the leg has pain? The swelling identified is on which part-ankle, foot, calf etc.
Next Steps
Ideally visit a general practitioner (family doctor) for appropriate direction and advice. Kindly look for any injury or boil that may have developed
Health Tips
In the meanwhile you may elevate the leg using pillows. Ensure while elevating your leg (45 degree angle) that your knee is well supported and not left hanging. Calf pumping exercise will help (example-putting your foot on accelerator and taking it off) 10 repetitions 8- 10 times a day. Ensure your leg is horizontal at that time.