Prepare the appropriate weight taking account of your fitness level and technical abilities. Take a shoulder-width stance under the barbell in the rack (with your back to the barbell). Grab the barbell wide with an overhand grip. Lift the barbell that was leaning against your back shoulders. Your feet are a little wider apart than at shoulderwidth and your toe tips have an up to 30 degree rotation outwards. Fix your stance and make sure your pelvis is in a neutral position.
From the starting position move down towards the floor and do not change the bend of your spine and inhale. Lead your knees while doing the motion along in the rotation direction of your toe tips. Keep your torso firm and do not bend forward too much. In the lowest position you should be below the level of your knees. Exhale while returning in the same way to the starting position. Do the required number of repetitions using the same technique.
Watch your body posture, fix your torso and keep your pelvis in a neutral position. Keep the knees in the toe tip direction throughout the entire motion and do not let them wiggle as you overcome the resistance. Also watch the forward motion of your knees and do not let your knees, torso and head cross the vertical plane of your toe tips. Keep your firmly heels on the floor throughout.
Start with lighter weight to master the technique well.
Smith machine can be considered by beginners or those training without a spotter. Any falls of barbell or of the trainee when squatting can have potentially serious consequences.
On the other hand, Smith machine will force the barbell to go straight down and up which is in fact not its natural trajectory. You will probably feel that you are forced into a posture that is not correct for barbell squats.
Also, the body core muscles are not involved in the same way as in barbell squats.
You need to stand in front of the barbell, not under it as in regular squat.