Barbell squat: Stand with a barbell resting on your shoulders and traps with your feet about shoulder-width apart. Maintain the natural arch in your lower back and keep your head directed forward. Bend at the knees and hips, letting your glutes track backward to lower yourself. When your thighs are parallel to the floor, reverse direction, driving up forcefully through your heels to a standing position. Repeat for reps.
Smith machine squat: Stand in a Smith machine with a shoulder-width stance and the bar across your shoulders and traps. With your chest high, keep your head forward and maintain the arch in your back. Bend at the knees and hips as if you're sitting back in a chair until your thighs are parallel to the floor. Reverse the motion by driving through your heels and pressing your hips forward to return to the starting position. Repeat for reps.
One major difference between the barbell squat and the Smith machine squat is how far you can bring your feet in front. With the barbell, there is only one position — feet directly under the bar. In contrast, the Smith machine follows a fixed path, thereby removing the need to balance it, so you can bring your feet out to various distances.
In 2002, the Journal of Strength and Conditioning Research reported that the farther the feet are positioned in front of the Smith machine bar, the less quad involvement and the greater hamstring/glute involvement. When the feet were directly under the bar, the hamstrings and glutes received little emphasis, while the quads got almost all the focus. When the feet were about 12 inches in front, the quads and hams/glutes were fairly evenly emphasized. When the feet were placed about 18 inches in front, the hams and glutes received the greatest emphasis, with the quads getting only a little.
Another difference between the barbell squat and the Smith machine squat is strength. Researchers from Drake University (Des Moines, Iowa) reported that when 32 trained lifters tested their one-rep max for the Smith machine squat, they were about 5% stronger than on the free-weight squat. The researchers suggested that the strength increase for the Smith machine squat may be due to the reduced need for balance, thus allowing a focused effort on driving the bar straight up.
Both exercises should be incorporated in leg training. Although the Smith machine squat has been shown to allow heavier training and the forward adjustment of foot positioning, the fixed nature of the Smith machine doesn't call numerous stabilizer muscles into play. Over time, this can decrease strength and even increase the risk of injury. Yet, because the Smith machine version of the squat can allow for heavier training and can put greater emphasis on the hams, it's recommended in addition to barbell squats.
Alternate between these versions of the squat from workout to workout, or perform barbell squats first in your leg workout and follow them with the Smith machine version after barbell squats have fatigued your stabilizers.
References: K.G. Abelbeck, "Biomechanical model and evaluation of a linear motion squat type exercise," Journal of Strength and Conditioning Research, 16(4):516-24, 2002; M.L. Cotterman et al., "Comparison of muscle force production using the Smith machine and free weights for bench press and squat exercises," Journal of Strength and Conditioning Research, 19(1):169-76, 2005.