Re: whenever I play ball my knees hurt
If the original poster is a young one (early to mid teens) I'd throw in the possibility of the aforementioned growing pains. Or more specifically, Osgood Schlatters Disease, which is basically a rupturing of a growth plate near the knees generated by accelerated growth.
I spent the latter part of my 8th grade year on into the cusp of my 9th grade year with these knee pains. It was a lot of intermittent play, then ice, then play, then ice. Luckily, people do "grow" out of this condition, if you will.