When you cut into the potato, you damage the cell walls that keep everything nice and tidy. The phenols and the enzymes meet the oxygen coming in from the outside world, causing a chemical reaction to take place. This chemical reaction results in - you guessed it - pink potatoes.