The pistil of a flower contains the female reproductive system. The pistil is located in the middle of the flower, and it contains the stigma, ovary and style.
During fertilization, pollen, or male reproductive cells, land on the stigma. From there, it travels to the ovary where it fertilizes the egg, called an ovule. Once an ovule is fertilized, it turns into a seed.
None of this would be possible without a flower's petals. The petals are usually brightly colored and often fragrant, attracting the attention of pollinators like bees and butterflies. Insects like these carry pollen from plant to plant, providing the pollen used to create new seeds, and eventually, new plants.