The back of the kneecap is shaped like a triangle with the point fitting in a grove in the lower part of the bone behind it. During running, the knee cap is supposed to move up and down and not side to side. If it moves from side to side, the back of the kneecap will rub against the front bottom of the femur, the long bone of the upper leg, causing pain.
Treatment is to stop the kneecap from touching the bone behind it, which is usually caused by the knee cap being pulled toward the outside laterally while the lower leg twists the bone behind it inward medially. When you run, you land on the lateral bottom of your foot and roll inward, causing the lower leg to twist inward. At the same time, three of the four quad muscles attached to the kneecap pull the kneecap outward and cause the knee cap to rub against the bone behind it. You can keep the knee cap from rubbing by wearing orthotics, special insets in your shoes, doing exercises to strengthen the muscle that pulls your knee cap inward. Surgery is rarely necessary.
A study from Long Beach VA Hospital in California shows why runners are far more likely to suffer knee pain than cyclists. When you run, you land on the outside bottom of your foot and roll inward toward the big toe side of your foot, called pronation. This study shows that the amount of inner twisting of the lower leg during running is related to how straight your knee is. Bending your knee decreases inner twisting and rubbing of the knee cap against the bone behind it. So people with runner’s knee can pedal a bicycle with their seats set lower than normal to prevent their knees from straightening, they can wear special inserts in their shoes that restrict pronation, and they can do special exercises that strengthen the vastus medialis muscle above the kneecap that pulls the knee cap inward when you run or pedal.