Hows your form when squatting? If you are not doing it right it can be hell on your knees. After that is said if you are using things like leg extension, if you have the pivot point even 1 inch out of alignment with your knee joint, you will have binding and terrible pain....
Assess your form first, 2nd check your rest (not between sets but between days of working them), finally diet/supplements. The odds of you being 22 and just having that piss pore of a diet/supplement regime to cause pain in knees are next to zilch.