Water moves into the plant stem from the soil, and up to the leaves via the xylem. Water is taken up by the hairs on the root of the plant down the water potential gradient via osmosis, following the active transport of nitrates from the soil using ATP. Once inside the stem, the water follows the osmotic gradient into the xylem of the plant which is created by continual loss of water from the leaves by transpiration.
The water moves up the plant using the cohesion-tension theory. Water molecules 'stick' together, this is known as cohesion; water molecules are polar and therefore bond to each other by van der waals forces between oxygen and hydrogen of neighbouring molecules. The water molecules also adhere to the thick cellulose walls of the xylem, this creates tension, these forces together with the water potential gradient allow water to move up the plant stem via the xylem.