Had it on and off for twenty years! I am not a Doc, was a military para medic, but have a few books on it, seen quite a few people about and had two ops. These are my thoughts on it:
It can come about for different reasons,
1. most commonly from kneeling (often then call house maid’s knee, carpet layers real suffer),
2. or over use
3. from an over powerful push off (usually called jumpers’s knee)
It is a massive tendon, one of the strongest in the body – counters the quads.
It takes different formats, becomes inflamed, tears in the tendon, tears in the join to bone (in extreme cases can come off ‘rupture’), the tendon and tendon sheath attempting to join etc. Really helps to know which damage you are dealing with.
To help it. All the usual stuff, ice, rest, massage it, anti-inflammatories, special stretches, more extreme have a steroid injection or a minor op.
When mine gets bad some physio treatment is effective, ultrasound and massage. Some people find wearing a patella tendon band useful.
When its playing up running uphill and my Single Speed on hills effect it the most. Gears, more spinning and flat runs are usually ok even when it isn’t.
Have a good look around the net and consider a physio.