The primary functional role of the Kneecap "patella" is knee extension. The patella increases the leverage that the tendon can exert on the femur by increasing the angle at which it acts.
It is attached to the tendon of the quadriceps femoris Muscle, which contracts to extend/straighten the Knee. The patella is stabilized by the insertion of the horizontal fibres of vastus medialis and by the prominence of the lateral femoral condyle which discourages lateral dislocation during flexion. The retinacular fibres of the patella also stabilize it during exercise.