How does one deal with a homomorphism on a coproduct of groups? I'm getting a little hung up on a short proof in Lang.

I'm not sure what to make of an element in the kernel. As I understand it, the coproduct is technically a pair consisting of an object and a family of morphisms, here $G$ is the object, and the family of morphisms is the set of  identity embeddings of $G_i\hookrightarrow G$ for each $i$. So what is the natural homomorphism here? Does it act on the morphisms, the $G_i$, elements in the $G_i$, elements in the direct product/sum of the $G_i$? And what exactly does it do to the elements in it's domain? After understanding this, I'm hoping to see how the rest of the proof follows.
Apologies if this is so basic, I'm just not fully clear on what's happening. Thanks.
 A: Since $G$ contains subgroups isomorphic to $G_{i}$ for each $i\in I$, you have embeddings $\iota_j\colon G_j\to G$ given by the subgroup inclusions. By the universal property of the coproduct, there is a unique homomorphism $\Phi$ from the coproduct to $G$ induced by the subgroup embeddings $\iota_j$. This homomorphism $\Phi$ is such that the natural inclusion $G_k\hookrightarrow C$ into the coproduct followed by $\Phi$ gives $\iota_k$. 
This is just the "universal property of the coproduct". We have an explicit description of the coproduct, given by the free product which is what is used in the second sentence to study the kernel of this $\Phi$. 

Added.
Okay, let's start from scratch, because I don't think Lang is very clear on this part.
Though I'm stating this definition for groups, the fact that they are groups is really immaterial; the definition only uses "objects" and "morphisms", so it is a "categorical" definition. In fact, it's the definition of "coproduct object" in the category of groups.
Definition. Let $\{G_i\}_{i\in I}$ be a family of groups. A coproduct of the family is an ordered pair, $(C,\{\iota_j\}_{j\in I})$, where $C$ is a group, and for each $j\in I$, $\iota_j\colon G_i\to C$ is a group homomorphism, such that $(C,\{\iota_j\}_{j\in I})$ satisfies the following "universal property":

Given any group $K$, and any family $\{f_j\}_{j\in I}$ of morphisms, $f_j\colon G_j\to K$, there exists a unique morphism $\mathcal{F}\colon C\to K$ such that $f_j = \mathcal{F}\circ \iota_j$ for all $j\in I$.

The morphisms $\iota_j\colon G_j\to C$ are called the "coproduct inclusions" (we don't know ahead of time whether they are actually inclusions, but in any category with a zero element, such as the category of groups, they will be inclusions as I show below), and often refer to $C$ as "the coproduct" (even though, technically, the coproduct is both the group and the inclusions).
As is usually the case, the definition guarantees that if there is a coproduct, then it is unique-up-to-unique-isomorphism (where the isomorphism must also "respect" the inclusions):
Theorem. Let $\{G_i\}$ be a family of groups. If $(C,\{\iota_j\}_{j\in I})$ and $(D,\{\kappa_j\}_{j\in I})$ are both coproducts of the family, then there exists a unique isomorphism $\Phi\colon C\to D$ such that $\kappa_j = \Phi\circ \iota_j$ for all $j\in I$.
Proof. Since $\{\kappa_j\}_{j\in I}$ is a family of maps from the $G_j$ to $D$, the universal property for $C$ guarantees the existence of a unique $\Phi\colon C\to D$ such that $\kappa_j=\Phi\circ\iota_j$ for all $j$. It only remains to show that $\Phi$ is an isomorphism.
Now we use the fact that $D$ is also a coproduct; since $\{\iota_j\}$ is a family of maps from the $G_j$ to $C$, the universal property of $D$ guarantees the existence of a unique $\Psi\colon D\to C$ such that $\iota_j=\Psi\circ\kappa_j$ for all $j$. 
Also, if we look at the family $\{\iota_j\}$, the universal property of $C$ guarantees the existence of a unique homomorphism $F\colon C\to C$ such that $\iota_j=F\circ\iota_j$. Since putting $F=\mathrm{id}_C$ works, then this is the unique map that has this property. Consider now $\Psi\circ\Phi$: we have
$$(\Psi\circ\Phi)\circ\iota_j = \Psi\circ(\Phi\circ\iota_j) = \Psi\circ\kappa_j = \iota_j$$
for all $j\in I$. So $\Psi\circ\Phi=\mathrm{id}_C$. Symmetrically, $\Phi\circ\Psi=\mathrm{id}_D$, so $\Phi$ is an isomorphism, as claimed. $\Box$
Since I mentioned it above, let me prove that the inclusions are actually inclusions.
Theorem. Let $\{G_i\}_{i\in I}$ be a family of groups. If $(C,\{\iota_j\}_{j\in I})$ is a coproduct of the family, then $\iota_j$ is one-to-one for every $j\in I$.
Proof. Fix $j\in J$. Consider the family of maps $f_k\colon G_k\to G_j$, where $f_j=\mathrm{id}_{G_j}$, and $f_k$ is the zero map if $k\neq j$. By the universal property of $C$, we have a unique homomorphism $\Phi\colon C\to G_j$ such that $f_k = \Phi\circ \iota_k$ for each $k$. In particular, $\mathrm{id}_{G_j} = \Phi\circ\iota_j$, so $\iota_j$ is one-to-one. $\Box$
So, if $C$ is a coproduct of $\{G_i\}$, then it contains subgroups isomorphic to each $G_i$. In fact, a bit more is true:
Theorem. Let $\{G_i\}_{i\in I}$ be a family of groups, and let $(C,\{\iota_j\}_{j\in I})$ be a coproduct for the family. Let $K=\bigl\langle \iota_j(G_j)\mid j\in I\bigr\rangle$. Then $C=K$; that is, the coproduct is generated by the images of the groups $G_j$ under the coproduct inclusions.
Proof. Consider the maps $\iota_j\colon G_j\to K$; by the universal property of $C$, there is a unique morphism $\Phi\colon C\to K$ such that for all $j$, $\iota_j = \Phi\circ\iota_j$. Now let $\Psi\colon K\to C$ be the subgroup inclusion. Then $\Psi\circ\Phi\colon C\to C$ satisfies $\iota_j = (\Psi\circ\Phi)\circ\iota_j = \mathrm{id}_C\circ\iota_j$. By the uniqueness clause of the universal property for $C$, it follows that $\Psi\circ\Phi=\mathrm{id}_C$, and in particular $\Phi$ is one-to-one and $\Psi$ is onto. But $\Psi$ is the subgroup inclusion $K\hookrightarrow C$; so being onto means that $K=C$, as claimed. $\Box$
Now, all of this is fine and well, but we haven't actually proven that there is such a thing as a coproduct of a family. There may not be! We can prove that if it exists it has all sorts of wonderful properties, but until we actually show that there is such an animal, all those theorems and properties may well be completely moot. So at some point, we usually need to abandon the "abstract nonsense" and get our hands dirty and actually come up with a group that is the coproduct.
In the case of families of groups, this object is the free product of the groups.
Definition. Let $\{G_i\}_{i\in I}$ be a family of groups. The free product of the family, $\mathop{*}\limits_{i\in I}G_i$, is the following group:


*

*The underlying set of $\mathop{*}_{i\in I}G_i$ consists of all finite (possibly empty) sequences of elements of the form $x_{i_1}x_{i_2}\cdots x_{i_m}$, where $i_j\in I$, $x_{i_j}\in G_{i_j}$, no $x_{i_j}$ is the identity element of the corresponding $G_{i_j}$; and for $k=1,\ldots,m-1$, $i_k\neq i_{k+1}$. 

*The operation on $\mathop{*}_{i\in I}G_i$ is the following: given $x_{i_1}\cdots x_{i_m}$ and $y_{j_1}\cdots y_{j_n}$, 


*

*if $i_m\neq j_1$, then the product is just the concatenation of the two words, $x_{i_1}\cdots x_{i_m}y_{j_1}\cdots y_{j_n}$. 

*If $i_m=j_1$ and $x_{i_m}\neq (y_{j_1})^{-1}$, then the product is
$x_{i_1}\cdots x_{i_{m-1}}z_{i_m}y_{j_2}\cdots y_{j_n}$, where $z=x_{i_m}y_{j_1}$.

*If $i_m=j_1$ and $x_{i_m}=(y_{j_1})^{-1}$, then the product is the same as the product of $x_{i_1}\cdots x_{i_{m-1}}$ and $y_{j_2}\cdots y_{j_n}$.



(That is: concatenate, and simplify if possible).
Proving this is a group is straightforward except for proving associativity of the operation; for that, there is a clever idea due to van der Waerden that simplifies things enormously. The idea is explained in George Bergman's Universal Algebra notes; in the case of free groups, it is in page 32, starting where it says "But there is an elegant trick..."; the case of the free product of two groups, with the same idea, is given in Proposition 3.6.5, page 49, of the same notes. 
Now, if $\mathop{*}\limits_{i\in I} G_i$ is the free product of the family, then for each $j$ we have a homomorphism $\iota_j\colon G_j\to \mathop{*}\limits_{i\in I}G_i$, given by mapping $x_j$ to the word of length one "$x_j$", if $x_j\neq 1$, and to the empty word if $x_j=1$.  We now have:
Theorem. Let $\{G_i\}_{i\in I}$ be a family of groups. Then $\Bigl( \mathop{*}\limits_{i\in I}G_i, \{\iota_j\}_{j\in I}\Bigr)$ is a coproduct for the family.
Proof. Let $K$ be any group, and let $f_j\colon G_j\to K$ be homomorphisms from each member of the family to $K$. Define $\mathcal{F}\colon \mathop{*}\limits_{i\in I}G_i\to K$ by
$$\mathcal{F}(x_{i_1}\cdots x_{i_m}) = f_{i_1}(x_{i_1})f_{i_2}(x_{i_2})\cdots f_{i_m}(x_{i_m}).$$
It is not hard to verify that this is a homomorphism, and has the required universal property. Moreover, the values of $\mathcal{F}$ are forced by the condition $f_j = \mathcal{F}\circ\iota_j$, so $\mathcal{F}$ is unique, as required by the definition of coproduct. $\Box$
So there is a coproduct for any family, given by the free product.
A few observations about the free product $\mathop{*}\limits_{i\in I}G_i$:


*

*It is generated by a family of subgroups that are isomorphic to the $G_i$.

*The subgroups $H_i$ are "independent", in the sense that a product of the form
$$x_{i_1}\cdots x_{i_m}$$
in which $x_{i_j}$ is in the subgroup corresponding to $G_{i_j}$, $x_{i_j}\neq 1$ for all $j$, and for each $k=1,\ldots,m-1$, $i_k\neq i_{k+1}$, equals the identity if and only if $m=0$.


What Lang is showing is that these two conditions also characterize the coproduct. Suppose that $G$ is a group as described in the theorem. For each $j$, we have an embedding $f_j\colon G_j\to G$ (the subgroup inclusion). By the universal property of the coproduct, there must be a (unique) homomorphism $\Phi\colon\mathop{*}\limits_{i\in I}G_i \to G$ such that for each $j\in I$, $f_j=\Phi\circ\iota_j$. The map $\Phi$ is onto because $G$ is generated by the $G_j$. And in fact, $\Phi$ is one-to-one: suppose there is an element of the free product that lies in the kernel of $\Phi$. Then this element is a finite sequence of elements with the properties that describe the elements of the free product, i.e., it is something of the form $x_{i_1}\cdots x_{i_m}$, where $i_k\neq i_{k+1}$, $x_{i_j}\in G_{i_j}$, $x_{i_j}\neq 1$. Then, since it is in the kernel of $\Phi$, we have
$$\begin{align*}
1 &= \Phi(x_{i_1}\cdots x_{i_m})\\
&= \Phi(x_{i_1})\cdots \Phi(x_{i_m})\\
&= f_{i_1}(x_{i_1}) \cdots f_{i_m}(x_{i_m})\\
&= x_{i_1}\cdots x_{i_m}.
\end{align*}$$
But condition (b) on the theorem says that the only way this can happen is if $m=0$, so that the only element in the kernel of $\Phi$ is the identity of the free product. Thus, $\Phi$ is an isomorphism, so these two properties (properties (a) and (b)) actually also characterize the coproduct of the family of groups.
This proposition allows you to go freely from the universal property of the coproduct, to the precise construction of the free product, to just knowing you have a group generated by "independent" copies of the $G_j$. It lays the groundwork that allows you to use whichever one may be more convenient at any given time.
I hope that helps.
