A lot of people complain of their knees hurting a lot while exercising, and often asked by their fitness trainers to stop an activity. Although that's not entirely wrong, you should see an orthopaedic right away if it's unbearable.
Should the ortho give a green signal you must understand, a primary cause for weak knees are weak butt muscles. Yup, you heard it right. You see the whole leg works like a pile of dominoes, pain in the foot or knee is probably originating at the hips.
What must you do?
Please please please - warm-up and cool down properly. That's a good 10-15 min of each.
Start with hip opening drills like hydrants and clamshells.
And EAT your proteins, vitamins and minerals. SLEEP WELL.
No exercise works without recovery.
It is very generic and also very common. Should you have a more specific problem, feel free to get in touch, and I can work on a one on one with you and your physio/ortho.