What is the difference between a hazard and out of bounds on a golf course?

On a golf course, out of bounds areas are marked with white stakes that denote the property boundary of the course. Hazards are marked with red stakes that denote a penalty area within the property of the course (e.g., water, marsh).

When a ball is hit out of bounds, the golfer is penalized one shot and is required to hit the ball again from the same spot. When a ball it hit in a hazard, the golfer is also penalized one shot, but has the option to hit the next shot from the same spot or from the point where the ball crossed the hazard boundary.