In the Rules, there are two classes of water hazard - water hazards and a lateral water hazards. Water hazards are marked with yellow stakes or yellow lines. Lateral water hazards are marked with red stakes or red lines. It is up to the Committee in charge of the course to decide whether it will be marked as a water hazard or a lateral water hazard. (For further clarification, read the definitions in the Rule book).
Rule 26-1 covers water hazards and lateral water hazards:
Rule 26 - Water Hazards (Including Lateral Water Hazards) and is shown below. For a water hazard (yellow markings) only options a. and b. are available. For a lateral water hazard (red markings), options a., b. and c. are available.
Note that in option c., the ball must be dropped within two club lengths of the point where the ball last crossed the margin of the lateral water hazard and not nearer the hole. This does not guarantee a stance.
Rule 26-1. Relief for Ball in Water Hazard
It is a question of fact whether a ball that has not been found after having been struck toward a water hazard is in the hazard. In the absence of knowledge or virtual certainty that a ball struck toward a water hazard, but not found, is in the hazard, the player must proceed under Rule 27-1.
If a ball is found in a water hazard or if it is known or virtually certain that a ball that has not been found is in the water hazard (whether the ball lies in water or not), the player may under penalty of one stroke:
a. Proceed under the stroke and distance provision of Rule 27-1 by playing a ball as nearly as possible at the spot from which the original ball was last played (see Rule 20-5); or
b. Drop a ball behind the water hazard, keeping the point at which the original ball last crossed the margin of the water hazard directly between the hole and the spot on which the ball is dropped, with no limit to how far behind the water hazard the ball may be dropped; or
c. As additional options available only if the ball last crossed the margin of a lateral water hazard, drop a ball outside the water hazard within two club-lengths of and not nearer the hole than (i) the point where the original ball last crossed the margin of the water hazard or (ii) a point on the opposite margin of the water hazard equidistant from the hole.
When proceeding under this Rule, the player may lift and clean his ball or substitute a ball.