Let H and K be two groups with maps from a third group G to each, then the amalgamated product over G (with these maps) often denoted H x_G K is the pushout of the diagram in Grp, or if you don't like category theory it is an object (group) with maps from H and K such that the composites with the injections from G agree, and it is universal with this property.
this exists and is unique up to unique isomorphism, as long as your groups have a set of generators.
examples of this abound in topology where it is used to find the homotopy groups using the Seifert-Van Kampen theorem. (some people don't use the Seifert part of the name)
example compute the fundamental group of the torus:
we cover with two open patches one is just the torus less a point (this is homotopic to the bouquet of two circles), the other a small open disc about this point. the over lap is then homotopic to a circle, thus we get
G= Z, H=triv, K=Free prod on two gens=F_2, the fundamental groups of those subset.
the single cycle in G is sent to the loop xyx^{-1}y^{-1}, and the id in triv, so these must be identified in the amalgamated porduct, and that is the only rule we see the generators must satisify, so that just tells us to abelianize F_2, ie ZxZ.