As a matter of interest, the dihedral group of infinite order is a special case of an amalgam of finite groups, as is the group ${\rm PSL}(2,\mathbb{Z}).$ In fact the former group is the free product $\mathbb{Z}/2\mathbb{Z} * \mathbb{Z}/2\mathbb{Z}$ and ${\rm PSL}(2,\mathbb{Z})$
is the free product $\mathbb{Z}/2\mathbb{Z}* \mathbb{Z}/3\mathbb{Z}$. In general, if $A$ and $B$ are two finite groups such that $C = A\cap B$ is neither $A$ nor $B,$ then the amalgam
$A*_{C} B$ is an infinite group which is generated by its elements of finite order.
A good reference for the theory of amalgams is the book "Trees" by J-P. Serre.