Apples and other produce (e.g., pears, bananas, peaches, potatoes) contain an enzyme (called polyphenol oxidase or tyrosinase) that reacts with oxygen and iron-containing phenols that are also found in the apple. The oxidation reaction basically forms a sort of rust on the surface of the fruit. You see the browning when the fruit is cut or bruised because these actions damage the cells in the fruit, allowing oxygen in the air to react with the enzyme and other chemicals.