If your heels come off the floor when you Squat, widen your stance to shoulder-width apart. You won’t be able to keep your heels down if you Squat with a narrow stance. So Squat with your heels shoulder-width apart and your feet turned out 30°. Then push your knees out on the way and down.
Don’t put a small plate or piece of wood under your heels. It’s unstable when Squatting heavy weights and increases stress on your knees by putting your shin horizontal. Widen your stance to shoulder-width apart instead and push your knees out. Your heels will usually stop coming off the floor.
Some people will advise you to Squat in weight lifting shoes to stop your heels from coming off the floor. However the heel won’t solve major technique or flexibility issues. And if the heel height is too big (over 2cm thick) your knees will come too far forward just like when Squatting on plates – ineffective.
One trick for keeping your heels down is to Squat with your toes curled up. This shifts the weight to the back of your feet. Ideally you should Squat with your whole foot on the floor and the weight over your mid-foot (your balance point). But you can curl your toes up as a temporary fix.
Squatting with the wrong shoes can cause your heels to come off the floor when you Squat. Do not Squat in running shoes with air or gel filling. They will compress under the weight and behave unpredictably. Wear shoes with hard, uncompressible sole like a Chuck Taylor’s all stars.
Tight ankles is sometimes the limiting factor. However stretching will by itself not fix bad technique on the Squat. You can stretch all you want, if your stance is too narrow or you’re wearing the wrong shoes, your heels will continue to come off the floor. So fix your Squat form first.