Mimi, what kind of pain are you having? Dull? Sharp? Intermittent?
Any redness, fever, or swelling in the joint?
Any stiffness off the bike?
Does it hurt after doing other activities, like walking?

You may be suffering from osteoarthritis. If that's the case the doctor will generally prescribe an anti-inflammatory (such as ibuprofen), elevating the knee, and applying a cold pack after exercise if there is swelling present. Generally, cycling is still recommended for diseased knees and the patient is usually counseled to exercise as tolerated. Swimming is the other option. Your doctor will probably prescribe a set of exercises to do in home as physical therapy or send you to a PT clinic for evaluation and treatment.

If you are having swelling in other joints, such as elbows, fingers, wrists, your doctor may check for auto-immune disorders, such as rheumatoid arthritis, lupus, etc.

I hope this helps. I've had several knee operations since in my teens and continue to follow recommendations of my ortho to cycle to keep the knee strong and to stabilize the joint.