If the golf course you're playing is of championship quality, you will probably see three different colored flags on the greens. Normally, you'll see six of each.
The red flag normally indicates that the pin is cut on the front portion of the green. A white flag is often used to indicate that the pin is in the middle portion, and a blue flag is often used to indicate that the pin is in the back.
Your eye can be wrong when judging the position of the pin from over 100 yards out, thus the use of these flags. When setting the course up for play, the position of the tees used that particular day will usually determine the position of the pins on the greens.