Here is how I learned to squat.
First, decide whether to hold the bar high on your traps (base of the neck) or low, (down below the top of your trap, and resting on your rear delts). Then set the racks so when you stand up with the bar, the bar is 1" to 3" above the racks.
If you are on a static rack, step back and set your feet. If you are under a competition rack that moves, stay where you are and let them retract the rack.
Set your feet so they are comfortable distance, about shoulder wide, toes pointing out slightly.
Take a deep breath and hold it, pressing out on your belt (this is why we wear a belt while squatting, to give us tension on our mid section). As you squat, first break at the hip and thrust your butt back as though you are going to sit on a toilet. Squat until you are ATG. Keep your head up and back tensed, continue holding your breath and don't exhale yet. Stand back up, leading with your head, holding your breath and keeping pressure on your belted midsection. Clench your legs and butt as you reach the top. Exhale at the top.
My coach said don't let your knees go past your toes. It is okay if they go forward, but they should not go past your toes.
If your knees go past your toes, you are not sitting back far enough. Remember you should be sitting back as though you are going down onto a toilet. If you have trouble sitting back, try letting your head go forward, but keep the tension in your back and don't round your back, keep it flat to slightly arched.