Hi welcome to HCM.
If the pain is running down the back of your leg, it is likely to be due to nerve
compression in your spine called sciatica
If the pain is in the front of the leg, it is from the hip or pelvic bone.
If the pain is new and recent, it will respond to anti inflammatory drugs taken for a week.'
If the pain is old and chronic please see your doctor for investigations, proper diagnosis and treatment. Hope this satisfactorily answers your query. Regards.