The patella (kneecap) sits at the front of the knee and runs in a groove at the front of the femur (thigh bone) as the knee moved from fully straight to a bent position. A number of conditions of the patella can lead to pain at the front of the knee, ranging from damage to the cartilage behind the patella and maltracking (patella not running centrally in the groove).
This condition can be quite painful, affecting your activities and sports. The mainstay of treatment is physiotherapy, though occasionally arthroscopic (keyhole) surgery may be used to address damage to the cartilage of the patella.