Capillary action is the ability of a liquid to flow in a very small narrow space and against gravity (as it flows upwards).
The movement of a liquid in a narrow space, along the surface of a solid, is caused by molecular attraction.
What is molecular attraction?
Molecular attraction is the ability of a liquid’s molecules (e.g. the solder) to attract the molecules of a solid (e.g. copper pipe).
During soldering, the solder flows in-between the copper surfaces and ensures a secure joint. This is without the assistance of, and is in opposition to, the external force of gravity.