We strongly suggest you go visit a physiotherapist, pain in the knees maybe because of so many reasons. Some of the precaution measures we suggest you follow are: 1 . Maintain your weight. Because extra weight can increase your chances of developing osteoarthritis, maintain a weight that's appropriate for your size and age to decrease stress on your knees and avoid increased chances for knee injuries. 2 . Wear sensible shoes with a good fit. As a result, you will maintain proper leg alignment and balance, thereby preventing knee injuries. 3 . Do low-impact exercise. Choose a cross-country skiing machine or a rowing machine in the gym. These two exercises are both high-intensity, but low-impact on your knees. 4 . Swim or walk. If you want to exercise outside the gym, choose swimming or walking. 5 . Don't decrease your activity. A decrease in activity will lead to weakness, increasing your chances of injuries. 6 . Don't suddenly change the intensity of your exercise. Build up gradually to avoid knee pain. 7 . Consider physical therapy. Visit a physical therapist if you have an existing knee injury so they can help you set up an exercise regimen.