The making of a solderjoint is basically possible due to a combination of physical forces that are acting on the liquid surface and the joint surface during the joint formation.
At first the surfaces involved in the joint-formation must be wettable and wetted by the liquid solder. Without proper wetting conditions good joint formation is not possible.
The amount of solder at a joint is further depending on the joint dimensions and capillary forces.
The information provided in this document is based on the content of chapter 2 from the book Soldering in Electronics Second Edition, written by R.J. Klein Wassink.
In this book chapter the theoretical basics of wetting are explained in detail.
This document is meant to elucidate the factors that are involved in the solderjoint formation from another point of view, however related to the same physical laws.