Fig wasps and fig trees have a mutual, or symbiotic, relationship. The way it works is that the fig wasps lay eggs inside the figs, where they can safely grow. In return, the wasps pollinate the figs. The interesting thing is that when a wasp lays its eggs in the tree but doesn't pollinate, the tree drops the fig, killing all the offspring.
There are more than 700 species of fig trees and fig wasps, all of which exhibit this kind of behavior. It is a relatively recent find that has scientists abuzz about all the details. You can check out all the details at the source