Hi and thanks for the query.
This could be a muscle sprain or a tendon inflammation, but what is needed is to rule out meniscal /ligament tears) especially the anterior and the posterior cruciate ligaments of the knee which are prone to injury during sports. An MRI of the knee is the best modality to further evaluate and diagnose this condition but prior to that an examination by an Orthopedic surgeon is required.
However, if you can not see the orthopedic surgeon at the moment or get an MRI done, you should start on conservative treatment at home, this can be done by applying Ibuprofen gel on the and around the knee four times a day with gentle massage, wear a knee brace or wrap an ACE bandage around the knee after application of the gel. Keep the leg elevated when lying down over a pillow, avoid vigorous activities but do not stop walking. I would also suggest that you start on an anti inflammatory pain killer like Motrin 400 mg thrice a day for 4 to 5 days to see if it helps with the pain and settles the inflammation.
Muscle sprains, injuries usually take 3 to 4 weeks to settle given the proper rest and medication. Anything taking longer will need an evaluation. This is most likely not a serious injury since, those are accompanied by bruising and swelling of the knee joint and marked restriction in movement.
Hope this helps.
Please do leave a positive rating for the service.
Let me know if you have any other queries regarding this.