Sit in a chair with a backrest or on a stool with no arms. Hold the guitar so that the bottom curve of the guitar body rests on your right leg if you're right-handed, or your left leg if you're left-handed.
The guitar should be angled slightly upwards so that the neck is in a comfortable position for your left hand to reach the frets. The back of the guitar body should rest against your stomach.
Rest your forearm on the top of the guitar body. This will help you to control your arm while strumming or picking the strings.
Place your fretting hand (non-dominant hand) on the neck of the guitar. Your thumb should be on the back of the neck in the center, and your fingers should wrap around the bottom of the neck to rest flat on top of the strings.
Keep your shoulders relaxed and avoid tensing up. This will help you play more comfortably and with less strain.
If you are playing a guitar with a strap, adjust it so that the guitar sits at a comfortable height for you. You should be able to play comfortably without having to hunch over or stretch too far, and your fretting hand should be able to slide left and right without holding the neck up.