The golf rule in plain language
A pond, ditch or other body of water on the golf course is officially called a "penalty area". Rule 17 describes what you're allowed to do if your ball ends up in one, and a penalty area is always marked with yellow or red stakes or lines. Which colour it is determines how many options you have.
Can you simply find your ball in the penalty area? Then you're allowed to just hit it like any other ball on the course, without penalty. You may place your club on the ground or in the water, take a practice swing that touches the water, and remove loose leaves or twigs, just like on the fairway. Still, most golfers choose not to play from the water. A ball lying half submerged is rarely a pleasant stance, after all.

What are your options with a penalty stroke?
If you'd rather not stand in the water with wet feet, you have the following options:
Play again from your previous stroke location. You play a new ball from the spot where you played your previous stroke, with one penalty stroke added.
Drop back on the line. You determine the point where the ball entered the penalty area, and then choose a spot on the imaginary line between that point and the flag, as far back as you like. There you have a one club-length drop zone in which to drop the ball.
Drop sideways, only with red stakes. With a penalty area marked with red stakes, you may also drop within two club-lengths of the point where the ball entered the area, no closer to the hole.
With yellow stakes, you only have the first two options. With red stakes, you have all three, which in practice often gives you a bit more room to play, especially when the water runs along one side of the course.
Yellow or red stakes: the difference in short
Yellow stake: usually water that lies directly in front of you, such as a pond in front of the green. You may play again from your previous stroke location, or drop back on the line.
Red stake: usually water that runs alongside the course, such as a ditch next to the fairway. In addition to the two options available with yellow, you may also drop sideways here, within two club-lengths of the point where the ball entered the water.
The reason for that difference is simple: with a ditch running alongside the course, dropping back on the line would sometimes mean you'd still have to play over the water. That's why the sideways option was added for red stakes. Handy to know before you're standing next to the ditch with your kid, arguing about which side is actually the right one to drop on.
What is a dropping zone?
On some holes, the golf club has set up a dropping zone in addition to the standard options from Rule 17, often recognisable by a line on the ground or a sign with the letters "DZ". This is an extra, optional way to drop, usually set up at a penalty area where the normal options are impractical in practice, for example because the water runs straight across the course.
If you use the dropping zone, one simple rule applies: the ball must land within that zone and come to rest there, without any measured club-lengths. You don't have to stand in the zone yourself to drop, but the ball does need to come to rest within it. If it rolls out, you simply drop again, just as with the other options. As a rule, it costs the same as the other relief options: one penalty stroke.
Note: a dropping zone isn't available everywhere. It's a choice made by the golf club or the competition committee, so check the local rules on the scorecard or with the starter beforehand to see whether a dropping zone has been designated for the water on that specific hole.
What do you do in practice?
Enough about the theory, because on the course it usually comes down to this order:
Determine whether you're sure the ball is in the water. Did you see it fall in, or hear a splash at exactly that spot? Then you may assume the ball is in the penalty area, even if you can no longer find it. If you're not sure, the rule for a lost ball applies, and you have to go back to your previous stroke location.
Look for the point where the ball entered the penalty area, not where it currently lies. That point determines where you're allowed to drop later on, and it can differ quite a bit from where the ball eventually sank or drifted to.
Choose your option. Play it as it lies, play again from your previous stroke location, drop back on the line, drop sideways as well with red stakes, or use the dropping zone if there is one.
Drop it the correct way. Release the ball from knee height within the correct relief zone, and let it come to rest there. If it rolls out, you simply drop again.
Not sure? Ask. Especially in a competition, it's wise to have a fellow player or marker take a look before you drop, since a golfer judging their own ball isn't always the most objective referee, after all.
In short
If you can find your ball in the water, you're allowed to just hit it like any other ball, without penalty. If you'd rather take a penalty stroke, you can always play again from your previous stroke location or drop back on the line, and with red stakes also drop sideways. Make sure you have these options ready before your ball heads that way again, then all you'll have to be annoyed about is the shot itself.