When the plant opens its stomata to let in carbon dioxide, water on the surface of the cells of the spongy mesophyll and palisade mesophyll evaporates and diffuses out of the leaf. This process is called transpiration.
Water is drawn from the cells in the xylem to replace that which has been lost from the leaves.
The xylem transports water and minerals from the roots up the plant stem and into the leaves.
In a mature flowering plant or tree, most of the cells that make up the xylem are specialised cells called vessels.
Transport in the xylem is a physical process. It does not require energy.
Water molecules inside the xylem cells are strongly attracted to each other. There is strong cohesion between the molecules because of hydrogen bonding. A continuous column of water is therefore pulled up the stem in the transpiration stream by evaporation from the leaves.
As water travels through the xylem in the stem and leaf, it is being replaced by water taken up by the roots.
Transpiration is an unavoidable consequence of photosynthesis - only about 5% of the water taken up by the plant is used for photosynthesis - but transpiration does have its purposes as it:
Root hairs are single-celled extensions of epidermal cells in the root. They grow between soil particles and absorb water and minerals from the soil.
A summary of water uptake, water transport and transpiration: