For _me_, dealing with knee pain requires heavy squats and stretching. Sometimes it is mashing out knots from muscles where the knotted muscle is pulling on the knee in a bad way.
As others have said, it really depends on the person. Medical abnormalities can toss a huge wrench into this. In general, if you don't use it, you lose it. Do things that cause muscle to build and support joints and do some mobilizing/stretching.