I injured my knee while riding last May by over-tightening my pedals, removing all the float, going for a long ride, and ignoring the pain I was in ("I'll be fine"). It was a stupid and very big mistake and took a long time to 1) figure out the injury (both chondromalacia and to a tendon) 2) find a good doc, and 3) get back to riding. It was a rough year and I did it to myself out of ignorance which only made it worse.
The first doc was a "sports medicine specialist" who works with an orthopedics group. He told me that I should find a different exercise, like an elliptical, and gave me a steroid injection in the knee. I had to refrain from reflexively kicking him in the nuts for such stupid advice. The 2nd doc is the #2 in orthopedics where I work, who told me "go ride, take something for the pain if you need it. It'll either get better or not but you won't make it worse." After some strengthening exercises, that's what I've done. It's been 3 months now and my knee is perfectly fine - much better than when I started riding again. Why? I've lost 20+ pounds and the cycling hasn't hurt it at all.