There are several ways to mess up the squat, but there are also several ways to improve it as well. Doing squats safely will not only show on your physique, but will make you a whole lot safer.
1. You should be squatting like you are sitting down in a chair. This way, your knees are kept from coming over your feet and you’ll be squatting the right way … with your quadriceps. Plus you’ll be getting assistance from your hamstrings. Now, this necessarily doesn't mean that you have to squat deep, but you can when you "sit back into it".
2. You should be squatting with weight in your heels, not in your toes. I see a lot of people lifting the heels from the floor when they are squatting.
3. Would be what most people do … excessive bending of the lower back. This is automatically caused by two different situations : First, If you are using free bar, it can be because the bar is too high on your back. The bar placement should be across your shoulders and traps. This is where the bar can stay still and secure. Also when you do this, don't have your hand looped around the bar like you normally do on the bench press. Second, If you are using the smith machine, your feet are not sufficiently positioned forward of the bar. I would say, if you like your spine, don’t risk; you should avoid these situations.
4. I've seen guys that squat when they get tired, they tend to lock out their knees to hold the weight. This is putting a lot of pressure on your knees, and they probably won't last long. Keep a bend in them during a set. This way, the weight stays on the quads and not on the knees.
5. Lastly, to maximize your squatting, have your chest out and during the squat keep your head up. If you look forward, without control, you tend to go forward. Also with your chest out, your chances of going forward won't happen, and you won't bend your back as well.