First treat the symptoms: rest, ice, compress, elevate.
Then look at the risk factors: shoes/clothing, training, stress, fatigue, lack of sleep, nutrition,…
And last but most important: eccentric training of the quadriceps. 12 weeks, 3×10-15 reps with a light weight, up to 2 times a day. Its allowed to hurt while doing the exercise, but when you are still hurt the next day, youve gone too hard.
Do not stop sports for longer then a week, that will not help and will make it even worse. Instead, reduce the volume and do the 3 things i mentioned above.