Greetings, feel sorry for your pain.
Going by your description you have strained your muscles at leg including knees.
Next Steps
Give ice 10 minutes twice a day. get to see a physiotherapist in your area. physio protocol for your pain is myofascial release, stretching and strength training for glutes and ankle.
Health Tips
if any concerns or if your trouble persists do let me know, will assist further