What us your age and weight ? If more then 45 then a lot of times due to overweight
the knee cap and the joints space gets reduced and causes a lot friction causing pain. It is called an osteoarthritis
Also an another possibility is of a ligament injury
which can occur due to an unusual twist or turn of the joints.
below the knee cap will cause a lot of pain and inflammation
So get a xray of the knee joint AP and lateral and see an orthopedician