Possibilities include chondromalacia, tendonitis, bursitis, fractures, patellar dislocation, injuries to the internal
knee ligaments/
menisci, infections/ inflammations, arthritis, cyst formation, bone growths/ tumours, nerve injuries etc; just to name a few. I would suggest consulting an orthopedician for an evaluation and appropriate management. Meanwhile you may try resting the knee with some OTC NSAIDS to relieve the pain.
Hope this helps.
Take care!