The answer is capillary action. There are two forces at play here: cohesion and adhesion. Cohesion is the attraction of water molecules to other water molecules while adhesion is the attraction of water molecules to other substances. When the adhesion of water molecules become stronger, It sticks to the stem, pulling itself up.