As Kevin said, see your doctor for a proper diagnosis. I would add, however, that knee pain during squats is mostly attributed to bad form. Most people will start squats by pointing their feet straight forward and moving their knees forward first and then their hips, dropping into a squat. This results in a bottom position where the knees are projecting past the toes, resulting in excessive pressure on the joint. To squat properly: feet should be shoulder width apart, toes angled outwards 15-30 degrees so that your knees track over your toes as you squat. To start the squat, move your hips back, just like you are going to sit in a chair. Your torso should not be straight up, but leaning slightly forward. At the bottom of the squat, your knees should not be past your toes. When you begin to rise from the squat position, you should be pushing with your heels/mid-foot, not from the toes. If you keep rolling forward on your toes, you'll have to increase the flexibility in your hamstrings. This tongue-in-cheek video gives a good example http://www.youtube.com/watch?v=y76UbfBr5vo
. You can also just Google "proper squat form" Most of the videos involve weighted squats, but the same form applies to bodyweight squats.