Given a colimit, compute the value as taking the union of all objects, and imposing the relation x∼f(x)for all arrows f∈Hom(X,Y) and all x∈X.
A colimit of the form AfB is computed by taking A⊔B and then imposing the relation a∼f(b). This is entirely useless.
A colimit of the form Af,gB is computed by taking A⊔B and then imposing the relation a∼f(a) as well as a∼g(a). Thus, this effectively imposes f(a)∼g(a). If we choose f=id, then we get a∼g(a). So we can create quotients by taking the colimit of an arrow with the identity.
A colimit of the form AfBgC will construct A∪B∪C and impose the relations b∼f(b)∈A and b∼g(b)∈C. Thus, we take A,B,C and we glue A and C along B via f,g. Imagine gluing the upper and lower hemispheres of a sphere by a great circle.