Build up your shooting position from your feet. Imagine standing like someone was trying to knock you off balance. Your feet should be about shoulder-width apart. For right-handed shooters, your left foot will be slightly forward and right foot slightly back. You should be facing your intended target and your body weight equally distributed on each foot while slightly leaning forward so that you are balanced on the balls of your feet. Grip the handle of the handgun with both hands (gripped such that the firearm will remain generally pointed at the target after firing, not dramatically moving around).
Note that it will take some practice to learn the best grip for you to keep the handgun pointed safely downrange and “on target” as you shoot. The best handgun grips use both hands. Your stronger hand holds the handgun grip firmly, and your other hand wraps around the other side, slightly under and on top of the fingers of your strong hand, which is holding the handle. (This grip provides a stable position to fire your handgun and each hand is involved in supporting the handgun.)
Take care to keep your thumb out of the way of the slide when firing a semi-automatic pistol, and when firing, fully extend your arms together and point the handgun at the target.