Enzymes present in fruits, mainly polyphenol oxidase cause the browning in damaged fruit. Normally polyphenol oxidase works in plants as a defense against insects. When activated this enzyme turns phenols in the plant into quinones, these quinones then turn into melanins which have beneficial properties to the plant- antibacterial, anti-fungal, and UV protection (another good reason to eat your fruits and veggies). Melanins are dark in color and so make the areas where they are present appear brown.
In healthy plant tissue the phenolic compounds are stored in the vacuole, well separated from the polyphenol oxidase enzyme so no activity happens. However, when a cell is smashed, cut, or otherwise tortured, the separating membranes are ruptured and polyphenol oxidase can access the phenolic compounds and start the process of turning them into quinones and then into melanins.
Fortunately there are some ways to stop this reaction.
1. Removal of oxygen- polyphenol oxidase requires oxygen to work so keeping the oxygen out helps to keep the reaction from occurring. This can be done in a couple of ways- putting the fruit under water (depending on the type of fruit – I can't imagine that would make a tasty banana) or using antioxidants- a common one is vitamin C, found in high levels in lemon juice, so squirting some lemon juice on cut fruit helps to keep it from turning brown (again, I just can't imagine that this would help a banana- that taste combination doesn't sound too appealing).
2. Removal of copper- polyphenol oxidase also requires copper to work. However, many of the agents that sequester copper probably aren't very safe to be putting on food, since we need those minerals too.
3. Heat- Heat will kill the enzyme- that's why blanching fruit helps to keep its color, but it destroys some of the nutritional value.
4. Low temperature (for chilling tolerant plants)- Low temperature will slow down the enzyme and for plants that can stand low temperatures this will delay browning. However, some plants, such as bananas are chilling sensitive and putting them at low temperature does about the same thing to the membranes as smashing them, so again that won't help with keeping bananas from turning brown- it will actually make it worse (as you already know).
5. Dehydration- without water the enzyme also slows down, but the dehydration process needs to happen quickly to avoid membrane rupture due to dehydration that will again cause browning. Dehydration is a good choice when you can't keep fresh fruit around because the nutritional value of dried fruit is fairly close to fresh fruit (you will lose some of the vitamin C).
When possible if you rip plants instead of cutting them (lettuce is the best example, not so easy to rip apples) you are less likely to rupture the cells, because the cell walls are pretty tough- so you get less browning.
Of course this process isn't always a bad thing, tea, coffee, and cocoa wouldn't be the same without browning.