Flowers that produce seed may have a male and female structure, a male-only structure or a female-only structure. The female part of the flower is called the pistil.
Flowers that reproduce by seed production need to have the female part pollinated by the male part -- much like mammals -- to produce offspring or seed.
The pistil is comprised of the stigma, style and ovary. The stigma receives pollen, the style provides a safe highway for pollen travel, and the ovaries contain the eggs, which develop in ovules.
Once the ovary has been pollinated, the ovules begin to form into seeds. The plant uses a lot of energy to develop these seeds, which is why many gardeners will deadhead or remove flowers so that energy can continue to be used for new blooms.
When the process of making seeds is finished, the ovary may open up and release the seed into the surrounding ground or the wind, or the ovary -- which in fruits or vegetables is the part we eat -- will depend on seeds being dropped to the ground after the ovary has been opened. Some seeds survive digestion and are deposited when an animal leaves droppings.