The conditions are then enough to ensure that π1(U,w), π1(V,w), and π1(W,w), together with the inclusion homomorphisms π1(W,w) -> π1(U,w) and π1(W,w) -> π1(V,w), are sufficient data to determine π1(X,w). It is easier to state the result in case W is simply connected, so that its fundamental group is {e}. In that case the theorem says simply that the fundamental group of X is the free product of those of U and V.
In the general case (with W still assumed at least connected, though) the fundamental group of X is a colimit of the diagram of those of U, V and W. In group theorists' terms, it is the free product with amalgamation of those of U and V, with respect to the homomorphisms from π1(W,w) (which might not be injective). In category theorists' terms, it is the pushout of the diagram.