About 99% of where your hand should go is determined by two things:
1. the style of music and sound you want
2. what feels comfortable to you
When I finger-pick an acoustic guitar, I find myself holding my pinky below the e-string on the pick guard (if applicable).
If I'm wanting a pulsing (I don't know the word, think punk-rock rhythm) strummed rhythm, I usually take the outside edge of my hand (the side that's opposite from the thumb) and rest my hand centimeters from the strings (not all bridges allow this comfortably). Then, for a slightly muted or faster-decay-time sounds, I lower my hand so it grazes the strings as the strings vibrate.
For basically everything else on acoustic or electric, the "floating hand" works best for me. I basically use my elbow to push the guitar towards me a little and just strum. I'm pretty sure I aim my pick so it's just to the top of the bottom pickup. I usually don't think about it so hard to give more detail than that.
If you're hitting the strings with your hand, then you could try moving your hand or tilting the guitar. Maybe even lower or raise the guitar. The last thing you could get checked out (by a professional) is an incorrectly aligned neck - I've seen on two guitars where a player's kept hitting the strings due to the neck being bowed inward too much. You'll find what works and it'll be second nature when you start playing to hold it whichever way you find is best.
Overall, I'd say personal preference and comfort are more important than any one "correct" way of holding your hand. Hendrix, SRV, Eric Clapton, and Slash all played completely different ways - not just styles, but they also held their hands differently, held the strings with different intensities, as well as numerous other things.