Well, first the basic disclaimer: I'm not an expert, nor a doctor, and if the pain is really bothering you, getting worse, or not going away, you should probably stop doing whatever is causing it and see a doctor. These kinds of injuries can turn into tendinitis and other nasty things if not properly handled.
Having said that, I would guess that the pain you're having is from squatting? If so, here are some comments (if not, please fill me in on the proper cause so I'm not talking out of my ass):
* Whenever you're feeling an injury, especially one that seems to be stress/overuse related, consider taking a break from the exercise. A week off from squatting won't set you back too far, but might let these aches & pains properly heal (instead of getting worse), and let you get back to the gym at 100%. As appropriate, ice and ibuprofen can be used to reduce swelling, which accelerates healing and reduces discomfort.
*
Some amount of knee & hip soreness is normal with squatting - after all, these joints are put under a lot of stress during the exercise. However, this soreness normally goes away quickly as the joints adapt and get stronger (one of the reasons
proper squatting is good for you, even your knees).
* However, it sounds like you have more discomfort than normal. Do you have any pre-existing knee or hip injuries? If so, I again urge you to check with a doctor.
* If not, then the cause is most likely bad squat form. I highly recommend the
Starting Strength Book, as it does a wonderful job of explaining the why & how of squatting, including great illustrations and corrections for common technique problems.
This forum also has a great compilation of "squat check" videos with responses from Rippetoe himself, although the page seems down now.
* Common squat form questions: when you squat, does your hip joint end up below your knee joint? Are your heels about shoulder width apart and your toes pointed out ~30 degrees? Do you keep your knees out over your feet the entire squat or do they bow in at all? Are you "sitting back" or just dropping straight down?
* Do you sit oddly at work or keep your knees in an odd position for long periods of time? I had some knee pain for a week or two before I discovered it was tied to the way I was sitting at work. I had my legs tucked way under my chair, so for ~8 hours a day they were in a very bent position. Once I stopped doing that and just sat with them unlfexed/relaxed, it went away.
* I also had hip pain for a few weeks from squatting. I believe my lower back injury screwed up my squat form, preventing me from "sitting back" properly, so I dropped straight down. This put my knees way too far forward of my toes which, I believe, can result in odd tendonitis-like symptoms in the hips. There are probably other form-related hip issues the squat can cause if done improperly.
Moral of the story: doctor, rest, heal, fix your squat form.