Sorry to hear you are having so much discomfort in your leg! You should definitely go see your pediatrician
about this as soon as you can, since it sounds like it has been going on for a while.
The most likely cause is that you have pulled your hamstring. This commonly happens in those who play different types of vigorous sports. It can also happen if you accidentally fall or twist your leg. Pulls of the muscles in the hamstring can take a long time to heal. Often, get back to normal requires resting from vigorous exercise as well as basic stretching exercises and anti inflammatory medications.
If your doctor
finds evidence of a hamstring pull, they will be able to recommend medications for the pain and swelling. They will also be able to give you advice about whether you need to stop playing sports for a while, or whether you need to do some stretching exercises. They can also rule out any other possible causes of the pain and "knot" sensation, such as a big bruise
inside the muscle.
Make an appointment with your doctor right away. In the meantime avoid any vigorous physical exercise until you have gotten the green light from your doctor.