This issue is called patellofemoral pain syndrome (PFPS) and refers to pain between the patella (kneecap and the trochlea groove) which is the grove at the end of the thigh bone (femur) which the knee cap runs through. It can be very painful and can limit function a great deal.
Most people with PFPS report pain when trying to run, when walking up and especially down stairs, walking long distances or downhill. Because of how often we encounter these tasks, it is easy to see why is it can be such a problem. The key to recovery is to offload the amount of stress through the patellofemoral joint.
It is important to identify the structures or muscles that are overloading the front of the knee and then work to reduce this strength. Strengthening is almost always a crucial part of this. Sometimes this may need to be supplemented with hands on therapies.
The difficulty of PFPS is that there are no shortcuts. There is rarely any surgical intervention that can help and because it is often caused by bio-mechanical imbalance, normally the only way to improve and fix the issue is to correct these imbalances. Without doing so, the chance of recovering is very slim, and PFPS has a tendency to stick with people unless they take it very seriously with the help of someone who can give them a graded exercise programme to aid recovery. Physiotherapists are the experts in this kind of therapy.
The good news is that with appropriate treatment, most people do very well, and because it involves a lot of self-help and exercise, usually your Physiotherapist will only need to check in with you from time to time to progress. Passive treatments alone will not help in the long-term so make sure you are given things to work on that will address the underlying cause of the issue, rather than simply (and incorrectly) targeting the symptoms.