We know that fruits contain seeds. In a plant, the seed is a small embryonic plant enclosed in a seed coat, and containing a food storage for the nutrients of the embryonic plant (which we can think of as the possible next generation, or the offspring). Fruit-bearing plants contain these seeds for reasons including protection and dissemination. The seed is protected as it is enclosed inside the fruit. Some fruits are hard (or not easily penetrable) such that the seed is not easily accessed. On the other hand, it can disseminated by attracting animals such as birds (or humans). Colorful fruits can attract birds, while tasty (sweet, or sour) fruits can attract humans, for instance. Usually, we eat the flesh of the fruit and get rid of the seeds. Seeds, when eaten, can pass through the gut undamaged, and hence emerge elsewhere (e.g. in animal wastes, which can serve as a fertilizer). Other fruits have pods, which dry up as they mature, and open up to release the seeds. Still, other fruits can disseminate the seed using wind (e.g. maple). Water dispersion is also possible- example is coconut which can float in the ocean (which is why we usually portray islands as having coconut trees).
Hence, fruits help in the dissemination of plant seeds, thus increasing chance of growing new ones.