The exact cause behind such pain is ascertained by the physician with the help of physical examination and various laboratory tests like X-ray, CT Scan, MRI Scan, blood test, etc. If the injury is minor, then rest, application of ice ,and elevation of the leg can help alleviate the pain.