If you have knee pain of almost any type, one of the first exercises you would learn in Physical Therapy is a Straight Leg Raise (SLR). This exercise is done to strengthen the quadriceps muscle (quads) of the thigh and to provide stability for the knee joint. An added benefit is that it also strengthens the hip flexors (muscles on the front of hip).
The following link (~30 second video) shows a modification of the Straight Leg Raise. It is performed with the leg rotated outward, which emphasizes the medial or inner part of the quads muscle (VMO).
With a basic Straight Leg Raise, you first bend the knee of the good leg to keep your back safe and comfortable. On the affected or painful side, straighten the leg completely and lock the knee. This is an isometric contraction for the quads muscle (quad set). With the knee straight, slowly raise the leg up about 10 inches, hold it for a few seconds, then slowly lower it back down to the surface. Repeat at least 10 times and work up to 30 repetitions by practicing a few times daily. Once you can do 30 reps, add a 1-pound ankle weight and practice with that resistance until you can do ~30 reps without stopping. Then progress similarly, 1 pound at a time, until you get to 10 lbs (it should take you 2-4 weeks if you do it 2-3x daily).
This can cause fatigue or strain to the front of the hip, so do not progress too fast if you are getting pain or discomfort there. It is important to do the exercise slowly in order to use muscle control and not momentum. Also, do not raise the leg too high, which would draw in other muscle groups. Do not forget to keep the knee locked the entire time.
For resistance ideas, you can use adjustable ankle weights, which range from 1-5 or 1-10 lbs and have removeable 1-lb weights. You could also use resistance bands, starting with light resistance and slowly progressing to harder ones. However, I recommend ankle weights more than therabands for this exercise so that you can keep your good knee bent.