Flowers that are planted in the ground have roots. Those roots absorb water from the soil. The water travels through the roots and up the stem to the leaves. The leaves gather sunlight and use the sunlight and water to make food. This process for making food using water, carbon dioxide (found in air) and sunlight is called photosynthesis.
Cut flowers do not have any roots. Therefore, the water moves up the stems and into the leaves.
Flowers do not "suck" water with their stems like a person drinking water with a straw. Instead, they use what is called capillary action. This means water molecules are attracted to a certain surface instead of to each other. These molecules will move along that surface because of that attraction instead of sticking to each other. Flowers contain capillaries, which are tiny tubes. The water moves along these tubes, up the stem and to the leaves. The "veins" of a leaf are capillaries.
The plant uses the water it drinks to make food in the form of carbohydrates. It does this by taking carbon-dioxide molecules out of the air, mixing it with the water molecules that have traveled through the capillaries and adding energy from the sun. The plant remixes the molecules from all three of these ingredients, ending up with carbohydrates, which it uses as food to grow new blooms and foliage. But after mixing its food, the plant has some leftover molecules it doesn't need. These are oxygen molecules, which the plant "throws away" by sending them back into the air. This is a good thing for mammals, which need oxygen to breathe.