Many people say squats are bad for the knees, but when done properly, nothing could be further from the truth. When squatting, knees should remain in line with the feet, and should not pass over your toes.
A lot of people have trouble with their knees turning inward while squatting, this is dangerous because it can lead to MCL strain and improper patella tracking. Keeping the knees in line with the feet is an easy fix, we need to activate the abductors (muscles out the thighs on the side) to stabilize the knee.
Spread the floor!
Get into your squat stance, and imagine there is a small rug or towel under your feet.
You want to spread the rug apart with your feet during the whole rep. Spreading the floor activates the abductors, and also allows the hip flexors (psoas) to contract harder.
By doing this, you are ensuring knee stability and health, and increasing muscle activation (psoas, abductors).