The seeds of a plant form in the ovary. The ovary is the part of the flower that develops into the fruit of the plant. The fruit stores food that helps the seed to develop into a new plant.
Seed bearing plants have both male and female parts. Some form perfect flowers, which include both male and female parts needed for reproduction. Others form imperfect flowers. In the latter, there are separate male and female flowers. The stamen produces pollen which must travel to the carpel in order to fertilize the seed for reproduction. Colorful flowers attract bees and other insects that improve the chances of pollination of the ovule.