The discolouration that can occur with some fruits and vegetables when they're cut open is caused by a process known as oxidation. In regards to potatoes, this discolouration is caused by the carbohydrates in the exposed potato flesh reacting with the oxygen in the air.
This oxidation often causes the exposed potato flesh to turn a pinkish or brownish hue, but does not affect the nutritional quality or taste of the potato at all. Any discolouration that occurs will disappear during cooking, but if you'd like to prevent discolouration altogether, the remedy is simple and quick.
Fill a large glass or metal bowl halfway with cold water.
Add 1 to 2 tbsp of white vinegar, lime juice or lemon juice for every 4 cups of cold water you've put in the bowl. Give this slightly acidic water a quick stir to spread the vinegar or juice around.
Scrub potatoes gently under running water with a vegetable brush and peel if necessary. Cut the potatoes into slices or chunks, according to recipe instructions.
Place the potato pieces in the bowl. Limit soaking time to no more than two hours so as not to lose any of the naturally-occurring, water-soluble vitamins in the potato.
Potatoes which have been cooked may occasionally develop darkened grey or blue/black spots when they are removed from heat and begin to cool. This is a natural reaction, and will not affect the taste of the potatoes in any way. Darker spots toward the centre of a potato are usually caused by temperature fluctuations during growing season. These discolourations are completely harmless and can simply be cut out and thrown away.
Don't eat potatoes that are green.