Possibilities that may need to be considered include patellar dislocation, chondromalacia patellae, infections/ inflammations, arthritis, bursitis, tendonitis, cyst formation, iliotibial band syndrome,
osgood schlatter disease, bone growths/ tumours, nerve impingement/ compression, fractures, injuries to the internal knee ligaments/ menisci etc; just to name a few. I would suggest consulting an orthopedician for an evaluation. After a cause is diagnosed, it can be managed accordingly.