When an apple is cut (or bruised), oxygen is introduced into the injured plant tissue. When oxygen is present in cells, polyphenol oxidase (PPO) enzymes in the chloroplasts rapidly oxidize phenolic compounds naturally present in the apple tissues to o-quinones, colorless precursors to brown-colored secondary products.
In case of iron pipes and copper coins there is a concept of corrosion.