depends how long ago you burnt it.
If very recently - i.e. today - keep running it under cold water. throw your leg in the shower and run cold water onto it. Do not ice it, unless the ice is well wrapped in a wet towel. you don't actually want the ice cooling the burn, the ice should cool the water in the wet towel which will cool the burn.
Then you want to dry the surface, apply some antibacterial burn ointment (this will help with pain, prevent it from drying out too much and decrease chance of infection). then cover with a gauze patch and bandage.
If it is a large area or a significantly deep burn, see a doctor.
change the bandage every day if possible. Watch for infection.
disclaimer: Im not a doctor, i am studying medicine. I have a decent understanding of medicine and have done first aid courses. This advice is general burns advice. if in doubt, see a doctor.