Thanks for posting your query.
From description it seems to be tendon strain. Give rest to your leg. avoid putting weight. Apply ice packs to decrease the swelling. you can take antiinflammatory drug like ibuprofen
to decrease pain and inflammation. If it persist consult orthopaedician for detailed examination.
Hope this will helps you. Feel free to ask me if you have any further queries.
Wish you good health. Take care.
Dr Saurabh Gupta