The flower is formed to begin the process of reproduction. The female parts will create an ovule, or unfertilized egg. The egg (or eggs) will remain in the ovary and wait to be fertilized. The male parts (in particular, the anther) will produce pollen, which contains the sperm needed to fertilize the egg.
Stems do many things. They support the plant. They act like the plant's plumbing system, conducting water and nutrients from the roots and food in the form of glucose from the leaves to other plant parts. Stems can be herbaceous like the bendable stem of a daisy or woody like the trunk of an oak tree.
The primary purpose of a flower is reproduction. Since the flowers are the reproductive organs of plant, they mediate the joining of the sperm, contained within pollen, to the ovules — contained in the ovary. Pollination is the movement of pollen from the anthers to the stigma.