Starting Position: Stand with both feet together or spread a few inches apart (2-3"), and parallel with each other. Pull your shoulder blades down your back and engage your abdominal muscles to stabilize the spine. Bend your knees slightly and keep tension in your inner and outer thigh muscles. This will help control the tendency to shift sideways during the single-leg stand.
Movement: Slowly lift one leg 3-6" off the floor; find your balance on the standing leg. Avoid any sideways tilting or swaying in your upper body and try not to move the standing foot. Hold for 10-15 seconds before returning the foot to the floor. Perform an equal number of repetitions with each foot.
Exercise Variation: Increase the intensity of this exercise by going through the following progressions (1) lift the one leg higher off the floor (illustrated) to further raise your center of mass, (2)raise both arms overhead (3) lift one arm to your side, (4) tilt your head, (5) close your eyes then finally (6) close your eyes and tilt your head.
Try to perform this exercise in front of a mirror initially so that you can watch and control the degree sideways shift over the standing leg. Always try to minimize the shifting the hips as it places excessive stress on your knee joint. While balancing on the standing leg, think about pressing your foot into the floor and squeezing your glutes (butt muscles), this will help reduce any sideways tilting.
Most of us can lift one leg, but the question of the quality of movement is important. Perform your movements slowly and under control, avoiding any sudden positional changes. Perform each progression until you can execute them with good control and form.