How to hold the guitar and place your hands
"Hold on to your faith, it will see you through."
- Malika E Nura

Now we are going to get prepared to actually play the guitar! At last!
You must have seen already that people play either sitting down or standing up. I recommend you first practice while sitting since I believe it’s more comfortable for most people.
There are two ways in which you can play while sitting down:
The casual way
This is, just as the name says, a relaxed way to hold the guitar. You have to rest the guitar over your picking hand leg, as seen in this photo (I play right handed):

It’s called casual way because it is more comfortable playing this way. I believe most people use this method most of the time. See how the guitar rests over my right leg (right-handed style). This is more comfortable to play, although your fret hand is in a more awkward position and tends to be a little more difficult playing.
The classical way
This position comes from classical players. You rest the guitar between the legs, as seen in this photo:

Although this position is not as comfortable holding the instrument, it provides a better angle on the fretboard to allow for a more comfortable fret hand position. This will be better for your health on the long run.
There is a third way to hold the guitar, which I cannot say I’ve seen any player use (so maybe it’s my invention). It is a variation on the classical way, in which you hold the guitar between your legs but also cross your leg over, like you can see in this photo:

Let’s call this position classical crossover.
I find this position the most comfortable of all. What’s good of this position is that you get the benefits of the classical position (guitar neck up in a good angle) but you can also control how high the guitar rests by crossing your leg more or less. The drawback is that is does tend to make your butt sleepy after playing for a while, so now you know...
Try the three positions and you’ll soon find your favorite.
How to place your hands
The way in which you should place your hands on the instrument is taught in many ways. In my experience, you should follow what’s natural to you, but with a small twist.
There is a technique which I believe is standard, and you should learn it first. Later, as you gain more experience and skill, you can just do whatever you know works best for you. It’s important that you first learn it in a standard way since you want to avoid learning a bad technique that will be difficult to unlearn later on. Learn the rules before you can bend them.
So how do we start? Place your thumb behind the neck and your other four fingers on the fretboard on the topmost string (the thickest), one finger on each fret, starting from the first one.

Why this position? If you do this way, your fingers are more free to glide over the fretboard without requiring any additional twist on the wrist. You’ll have to strengthen your wrist and hand muscles in order to feel comfortable, but it’ll be worth it. For now, don’t worry about it.
The line of your knuckles should be parallel to the guitar neck (or close to parallel), as seen in this photo:

If you hold the guitar in this way and place your hands as we've just seen, you will drop the risk of injury on your hands and wrist dramatically.
You have to play hard, but play safe.