Water mostly enters a tree through the roots by osmosis and any dissolved mineral nutrients will travel with it upward through the inner bark's xylem (using capillary action) and into the leaves. These traveling nutrients then feed the tree through the process of leaf photosynthesis.
Examples of capillary action in water include water moving up a straw or glass tube, moving through a paper or cloth towel, moving through a plant, and tears moving through tear ducts