Facing downhill, curb present
Turn the wheels toward the curb (right, on a right-side curb). If the parking brake fails and the car rolls, the front tire catches the curb and stops the car. This is the single most-tested case.
Facing uphill, curb present
Turn the wheels away from the curb (left, on a right-side curb), then let the car roll back gently until the rear of the front tire rests against the curb. A runaway car rolls backward into the curb and stops.
No curb, either direction
With no curb, always turn the wheels toward the side of the road. A runaway car rolls off the road rather than into the lane of traffic. This rule applies the same whether you are facing uphill or downhill.
Always set the parking brake
Wheel direction is the backup, not the primary. Set the parking brake every time, even on a flat surface. Many modern automatics also benefit from being shifted to park only after the brake is set, not before, so the parking pawl in the transmission isn't holding the entire weight of the car.