The first treatment for runner's knee is to stop doing the activity that causes pain. If running causes pain, try walking. Biking and swimming are both good exercises that don't irritate the knees.
RICE—rest, ice, compression, and elevation—and anti-inflammatory medicine can help.
Physical therapy exercises that focus on the muscles around your knee can help prevent future pain, and orthotics may be helpful to align your foot and ankle.