Understanding the "triangle" argument to find a homomorphism from a direct product to a group and other instances of the argument Recently I learned about the "triangle" argument of maps when trying to find a homomorphism from a direct product of finite groups to another finite group. If I understand correctly when you have a direct product of finite groups $G = G_1 \times G_2 \times \cdots \times G_n$ and another finite group $H$ then there is definitely a homomorphism from $G$ to $H$ if you can find the following.
1.) Homomorphisms $\phi_i : G_i \rightarrow G$ for all $i \in \{1, \ldots, n\}$ (and the inclusion map will do the trick)
2.) A homomorphism $\psi_i: G_i \rightarrow H$ for all $i \in \{1, \ldots, n\}$ such that elements in the image of $\psi_i$ commute with elements in the image of $\psi_j$ 
The professor made an off hand remark about how this sort of "triangle" argument with maps comes up a lot. Is there a formal name for this phenomenon? Am I getting any jist of this particular example of this "triangle" argument correct?
It makes sense intuitively that if you have 3 groups $A, B, C$ and want to find a homomorphism from $B \rightarrow C$ that finding one from $A$ to $B$ and from $A$ to $C$ might "induce" some sort of homomorphism in some instances but I don't really understand the restrictions on that (do they need to be isomorphisms? are there always special conditions like for our map's $\phi_i$?)
 A: I'm not sure I entirely understand the question, but I will answer what I think you are asking. If I have misunderstood you, feel free to mention this in the comments, and I will try to edit my answer accordingly.
That said, let's get to the answer

It has become the norm in certain parts of mathematics to place emphasis on the relations between objects rather than the objects themselves. In the world of group theory, this means we want to understand group homomorphisms, and through understanding homomorphisms, we can understand groups. This mindset comes from the world of Category Theory, which I will not talk about in this answer, but which I would recommend you look into if this answer intrigues you.
With this framework in mind, it is not enough to give a means of constructing a new group from old groups. We should also strive to understand the homomorphisms into and out of this construction. One such construction, which you have mentioned, is the Product of groups.
If we have a product of groups $G = G_1 \times G_2 \times \cdots \times G_n$, then, we would like to understand what the homomorphisms going into and out of $G$ look like. 

Let's start with homomorphisms into $G$. That is, given a group $H$, we want to understand homomorphisms $\varphi : H \to G$. Well, $G$ is built up out of smaller groups, $G_i$. Maybe there is some way for us to understand homomorphisms into $G$ by studying the homomorphisms into each $G_i$.
If $\varphi : H \to G$, then we get a family $\varphi_i : H \to G_i$ where we define
$$\varphi_i = \pi_i \circ \varphi$$ 
for each $i$. 
Here, $\pi_i : G \to G_i$ gets the $i$th component of $G$. That is, 
$$\pi_i((g_1, \cdots, g_n)) = g_i.$$
Following our nose, we can ask if this is enough. That is, given a family of functions $\varphi_i : H \to G_i$, can we define a new function $\varphi : H \to G$?
Indeed the answer is yes! Let's define 
$\varphi(h) = (\varphi_1(h), \varphi_2(h), \ldots, \varphi_n(h))$. I leave it to you to check that this is actually a homomorphism.
These two pieces of information, taken together, tell us that the information contained in a homomorphism $\varphi : H \to G$ is exactly the same as the information contanied in a family of functions $\varphi_i : H \to G_i$.
We can summarize this information in the following picture - which is where the "triangles" in your question comes from:

Working mathematicians use diagrams like this one in order to compactly encode lots of information about an object. We frequently ask that these diagrams "commute", which means that any path from point A to point B corresponds to the same homomorphism. 
The above diagram commutes if each of the triangles defined by $\varphi$, $\pi_i$, and $\varphi_i$ commutes. That, then, means we require $\varphi_i = \pi_i \circ \varphi$.
So this diagram, correctly interpreted, tells us that homomorphisms into the product $G$ correspond exactly to families of homomorphisms into each $G_i$.
Indeed, depending on your disposition, you might define the product 
$G_1 \times G_2 \times \cdots \times G_n$ to be the unique (up to isomorphism) group which has the above property! I will leave it to you to check that any group with this property is actually isomorphic to the direct product as you have seen it defined. 
This is why the "triangle" argument is so common in mathematics. Often we don't care how an object is "implemented" - we only care about how we can use it. And we know how to use an object exactly when we know how to define functions into and out of it.
There are many many objects in mathematics which can be defined purely in terms of these "triangles", which are properly called "diagrams" (because they are often more complex than just triangles). Category theory is, in part, the study of exactly which objects can be constructed in this way, and why.

Now that I'm done preaching, we can turn our attention to homomorphisms out of the product. This is the direction which you explicitly asked for in your question.
Say we have a homomorphism $\varphi : G \to H$. Then, as before, we want to relate $\varphi$ to homomorphisms having to do with each $G_i$ making up $G$. Now we use the fact that each $G_i$ has a natural homomorphism into $G$: 
Define $\iota_i : G_i \to G$ by 
$$\iota_i(g_i) = (e_1, \ldots, e_{i-1}, g_i, e_{i+1}, \ldots, e_n)$$
where each $e_k$ is the identity element of $G_k$.
But now $\varphi \circ \iota_i : G_i \to H$ is a homomorphism, so we again have a family of homomorphisms from $G_i \to H$ associated to each homomorphism from $G \to H$. 
Can we go the other way, though? If we have a family of homomorphisms 
$\varphi_i : G_i \to H$, is there a good way to define $\varphi : G \to H$?
After some thought, one might try 
$$
\varphi((g_1,g_2,\cdots,g_n)) = 
\varphi_1(g_1) \cdot \varphi_2(g_2) \cdots \cdot \varphi_n(g_n)
$$
This very nearly works! Indeed if $H$ is abelian, then this does work. I encourage you to prove this, if you'd like!
Unfortunately, it does not quite work. The reason is simple: In $G$, we have some extra information about how $\iota_i G_i$ and $\iota_j G_j$ interact, and we need to make sure we include that information in the family $\varphi_i$!
Indeed, in $G$, $\iota_i(g_i) \iota_j(g_j) = \iota_j(g_j) \iota_i(g_i)$. This is saying nothing more than (in the $n=2$ case, for example)
$$(g_1, e_2) \cdot (e_1, g_2) = (g_1, g_2) = (e_1, g_2) \cdot (g_1, e_2)$$
Because of this, any $(\varphi \circ \iota_i)(g_i)$ must commute (in $H$) with any $(\varphi \circ \iota_j)(g_j)$. It is exactly this bonus structure which we must account for!
Say we have homomorphisms $\varphi_i : G_i \to H$ such that every $\varphi_i(g_i)$ commutes with every $\varphi_j(g_j)$. Then we can define
$$
\varphi((g_1,g_2,\cdots,g_n)) = 
\varphi_1(g_1) \cdot \varphi_2(g_2) \cdots \cdot \varphi_n(g_n)
$$
and with the bonus information about commutativity, this is a homomorphism $G \to H$.
I encourage you to draw a diagram here, which encodes the relevant information for homomorphisms out of $G$. Be sure to remember that this diagram only works when all of the ways of going around the triangles commute. Convince yourself that requiring these triangles to all commute will guarantee that $\varphi_i(g_i)$ and $\varphi_j(g_j)$ commute in $H$.

As an aside, you might ask yourself if there is a different group $G'$ such that homomorphisms out of $G'$ are characterized by families of homomorphisms out of each $G_i$ without the bonus information we needed above. Indeed such a group does exist, and it called either the free product or the coproduct of the $G_i$.

I hope this helps ^_^
