But technically, hazards on golf courses fall into only two categories: bunkers and water. According to the Official Rules of Golf, hazards are defined very simply:
"A 'hazard' is any bunker or water hazard."
A ball is considered to be in a hazard when any part of the ball touches that hazard (in other words, the ball doesn't have to be fully inside the boundary of a bunker or water hazard to be considered in that hazard).
Note that water hazards (including lateral water hazards) don't have to actually have water in them to count as hazards. Water hazards should be denoted on the course with yellow stakes or yellow lines, and lateral water hazards with red stakes or red lines.
There is no separate section within the official rules that deals specifically with bunkers, but bunkers and procedures for playing from them are covered in many different areas of the rulebook. Water hazards are specifically addressed in Rule 26.