In some species, the animal eats the fruit, and the seed is left behind to germinate. In others, the fruit is eaten whole and the seeds are excreted in the animal's droppings. Many seeds are dispersed by animals such as squirrels, or jays, that bury them for the winter, but then forget to eat them, giving the seeds a chance to sprout. There are also plants that disperse their seeds by ejecting them. The most common method of ejection is explosive, but there are many variations on that theme.
Some desert plants wait for rain to swell their capsules.
This adaptation makes sense in a dry environment. If there is enough rain to trigger the capsules to open and expel the seeds, there is also enough moisture for the seeds to germinate. Dispersal may expose a seed to many harsh environments before it reaches a place to germinate. And no matter what the method of dispersal, it is still generally a matter of chance whether the seed will land in an environment in which it can survive and flourish. Many seeds have adaptations that protect them while they travel, or prevent them from germinating until the conditions are just right.