A lateral hazard is defined by red stakes and/or a red line. When a player's ball goes into a hazard of this type, there are several options, many which I see played incorrectly by amateur golfers.
First, if the player can find the ball in the lateral hazard, he/she may play the ball as it lies. However, the club may not be grounded (club cannot touch the ground or part of the hazard, including vegetation).
If the player cannot find or play the ball in the hazard, the following options are allowed as quoted from the rules of golf:
a. Play 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.
There are three penalty drops the player can do. Each is a one stroke penalty.
1. Drop in the original location the last shot was played from.
2. Drop the ball in line with the pin and the point which it entered the hazard, back as far as the player wants.
3. From the point the ball entered the hazard, drop within two club lengths, no nearer the hole.