People spend too much time sitting so it's common to need to stretch the anterior chain and strengthen the glutes. Hips are a much bigger problem for most people than they realize - probably most of the population and most of this forum. Many people are so focused on their lifting routines that they forget things like posture and training their body to move and function properly.
This Greg Everett video is part of the warm up routine of a well known olympic lifting coach. Watch what he does for "hip circles" and "bow and bends". These dynamic stretches are good to do while warming up and throughout the day if you are sitting a lot.
The best stretches for squat flexibility are squatting exercises. See
this Pendlay video. My routine is to take a bar with 115 or 135 pounds and do the stretch that Pendlay shows with the bar on the knees, then sit in a deep back squat with the bar, then sit in a deep front squat with the bar, and finally do the stretch that Pendlay shows with the elbows pushing the knees out.
There are other stretches for the hips and other body parts. Different stretches work better for different people.
I think
this video is the hip flexor stretch that Steelex recommends.
I can't find a good video but there is stretch we do in martial arts called the sumo stretch where you spread your feet out wide, keep your torso as vertical as possible, and push your knees out... like a sumo wrestler. It requires some balance but I spread my feet out very wide and pull my knees directly back. This stretch worked wonders for my hips and probably gave me an extra half inch of height as it straightened me out. I think I'm about an inch taller than I used to be and people comment on my posture sometimes. I've done a lot of stretches but the stretches in this post are the ones that are the most responsible for those improvements.
Finally, there are several demonstrations of yoga wheel pose on youtube. In my opinion this is the squat of stretches. It's the best thing that hits the most body parts. It looks a little odd to do in the gym but if I could only do one stretch then it would be that one.
I've read different opinions on when to stretch. Extensive stretching probably shouldn't be done before lifting. Some people say you can do a lot of stretching in between sets. Others say you should stretch just enough to be able to get into a full range of motion for your lifts and then do most of your stretching after lifting.