Fruit decomposes because bacteria, fungi, and other micro organisms invade the fruit and secrete enzymes that cause rotting. Hastening the rotting process along with enzymes that occur naturally in the fruit, the success of these organisms and enzymes is also influenced by environmental factors like oxygen and water.
In order for fruit to spoil at all bacteria or fungi must be present. The fruit that begins to spoil the fastest normally is damaged on the surface in a way which allows easy access by the microbes. The oxygen in the air hastens deterioration as well by causing oxidation to the fruit and a providing a nurturing environment for the micro organisms. Water is also essential for the success of the organisms and since fruit consist of a large percentage of water, bacteria and fungal growth is encouraged even further.
The first organism to typically infest a fruit is fungi as they are more equipped at destroying the plants cell wall. Once this occurs the enzymes secreted begin rotting the fruit making it more favorable to be host to bacteria population, further increasing the rate of rotting. Some environments that can prevent fruit rot are those typical of food preservation such as pickling in acidic solutions or candying in sugar.