Pain when bending the knee has many possible causes. In younger and active people, it is often patellofemoral pain (sometimes called runner's knee), where the kneecap does not track smoothly, or a tendon overuse problem. Twisting injuries can damage ligaments or the meniscus cartilage, which may cause clicking, locking, or a feeling that the knee gives way.
In older adults, osteoarthritis is a common cause, producing pain, stiffness, and sometimes grinding sensations that are worse with activity. Inflammatory arthritis and gout can also affect the knee, usually with swelling, warmth, and redness.
See a doctor if the knee is significantly swollen, locks or gives way, cannot bear weight, looks deformed, or is hot and red with fever (which can suggest infection and needs urgent care). For milder pain, relative rest, gentle strengthening, and over-the-counter pain relief may help, and a physiotherapist or doctor can guide rehabilitation.