You may be having symptoms of a problem called patellofemoral pain syndrome (PFPS). PFPS can occur when the kneecap rubs against the femur (thigh bone) as it moves up and down with knee motion.
Sometimes the patella, or kneecap, gets out of the groove it normally glides in. Abnormal positioning of the patella leads to inflammation and pain. This problem can get started by muscle imbalance, inflexibility, changes in the bones, improper walking pattern, overuse, or trauma.
There are many ways to treat PFPS. Consult with a physical therapist or orthopedic surgeon for a proper diagnosis. The best treatment plan depends on the exact cause of the symptoms.