Water molecules interact with one another, leading to surface tension. Water molecules also interact attractively with other materials, such as cellulose molecules, glass, etc. The interaction with a surface can pull water molecules against the force of gravity. (Remember, chemical interactions almost always exceed gravitational interactions in strength.) The trick is to maximize the interactions, which means a large surface area relative to the mass of material to 'lift,' which is very well accomplished using a capillary. A capillary is a hollow, cylindrical tube with a very small bore. If a liquid rises a height h in a tube of internal radius r, the surface tension (γ) is:
ρ is the density of the liquid and g is the gravitational constant (about 10 m/s2; 10 meters per second per second).
The name capillary is given to the smallest blood vessels. When red blood cells traverse a capillary, their shapes must change slightly in order to pass through.
Capillary action is described for students [local] at the USGS site.