Squats are a fantastic exercise for many and the worst thing some could choose to do. That comes down to your injury history and training needs. Once you know if you're going to squat or not, you need to know how.
Squats are not always as simple as "sitting down and standing up" - at least not when you have double your body weight on your back. Staying balanced is an important skill in learning to squat heavy weights. It comes down to some basic physics. Exciting!
In order to lift well, you must maintain balance over the base of support (the space your feet create underneath you). If too much weight goes forwards or backwards (or heaven forbid sideways?!) of your base then you lose balance and must have a ridiculous amount of strength to correct it. To be most efficient you must keep your mass plus the mass of teh bar and load over your base.
The red line approximates the centre of mass based on having a loaded bar on your back (high bar back squat style). The length and ratio of your limbs/torso will dictate how your squat looks. The only black and white rules are; centre of mass stays over centre of balance AND you should maintain good joint alignment while doing so.
These rules apply whether doing a high bar olympic style squat, front squat, goblet squat, or low bar squat. It's why you can lift more weight with some stances than others and it dictates your efficiency in the olympic lifts too. The higher the extra load is, the higher your centre of mass is. The further the centre of mass is from the base of support, the harder it is to balance.
In some instances mobility isn't the limiting factor in deep squatting, it could be that you simply aren't strong enough in the right places to maintain this balance. Some of your body must go back and some must go forwards. This is why the knees MUST move forwards in order to squat deep. Which by the way is not a bad thing as long as you're knees are healthy and you don't max out the weight all the time.
If you're curious, try an overhead squat assessment on yourself. I've done a quick video to help you out HERE.