Thanks for the question; you're right that the details can be very important. It's easy to come up with a misleading waist-to-hip ratio by sucking in your gut or cheating out your hips.
Here's an excellent piece by a Mayo Clinic physician who describes how to measure your waist.
The counterpart advice for hips is usually to measure the place with the widest circumference around hip bones or buttocks while standing.
This Wikipedia article includes the following simple description:
"To calculate the ratio, use a non-stretchable tape. Make sure it is level around the body, parallel to the floor, and tighten it without depressing the skin. Measure the waist at its narrowest point width-wise, usually just above the belly button. Measure the hips around the widest part of the hip bones. Then divide the waist measurement by the hip measurement."
And if you really crave precision, here are directions written for physical therapists to follow when measuring waist and hips.