Slice an apple, and the cut side turns brown. The knife set something off.
An apple's cells hold chemicals and an enzyme, a helper that speeds up chemical changes. Cutting breaks the cells open.
Oxygen from the air then joins with the chemicals, and the apple's own enzyme speeds this up. That makes brown materials. Browning alone doesn't mean the apple is rotten.