Welcome to the Sore Knees Club - we have lots of members!
First of all, do you know why your knees are sore? Is it arthritis or have you injured them? Have you seen a doctor or been through physical therapy for them?
What kind of exercise are you doing now that makes them hurt?
There are lots of ways to exercise that will protect your knees and actually help them by strengthening the muscles that support the joints. If you can fill me in a bit on what the knee issue is, what you're currently doing, and what your goals are, we can put our heads together and come up with a plan.