Much before the actual flower is seen on a plant, the decision that the plant is going to flower has taken place. Several hormonal and structural changes are initiated which lead to the differentiation and further development of the floral primordium.
Inflorescences are formed which bear the floral buds and then the flowers. In the flower the male and female reproductive structures, the androecium and the gynoecium differentiate and develop.
You would recollect that the androecium consists of a whorl of stamens representing the male reproductive organ and the gynoecium represents the female reproductive organ.