Direct product of groups in categorical terms In the category of abelian groups $\mathsf{Ab}$ the coproduct is the "direct" product (only finite support), but the product is the "cartesian" product (may be infinite support).
In the category of general groups $\mathsf{Grp}$ the coproduct is the free product, the product is the same as in $\mathsf{Ab}$.
So, how to explain "direct" product (only finite support) in $\mathsf{Grp}$ with categorical terms?
 A: I assume the question is how to characterize the group
$G:=\{a \in \prod_{p \in P} G_p : \mathrm{supp}(a) \text{ finite}\}$ 
for a family of groups $G_p$ in terms of category theory. I would call it the "commutative coproduct" because $G$ satisfies the following universal property: There are homomorphisms $j_p : G_p \to G$ which commute pairwise in the sense that the image of $j_p$ commutes elementwise with the image of $j_q$ for all $p \neq q$. If $H$ is another group, and $f_p : G_p \to H$ are commuting homomorphisms, then there is a unique homomorphism $f : G \to H$ with $f \circ j_p = f_p$.
Some authors write $G=\bigoplus_p G_p$, but this is quite confusing since usually $\oplus$ denotes a coproduct. I would write ${\mathrm{comm} \atop {\bigoplus_p}} G_p$ or something like that.
It follows from the universal property that $G = (\bigoplus_{p \in P} G_p) / N$, where $N$ is the normal subgroup generated by the commutators $[G_p,G_q]$ for $p \neq q$. In particular, presentations of $G_p$ give a presentation of $G$.
Now one might even go further and try to describe the condition that two morphisms $f,g : G \to H$ of groups, or say just monoids, commute in terms of category theory. But I doubt that this works in every category, we need some additional structure. Here is a a quite general setting for this:
Let $\mathcal{C}$ be a monoidal category. Let $G,H$ be group objects in $\mathcal{C}$ (aka Hopf monoids). Then two morphisms $f,g : G \to H$ commute with each other if the following diagram in $\mathcal{C}$ commutes:
$$\begin{array}{ccc} G \otimes G & \xrightarrow{f \otimes g} & H \otimes H \\ \Delta \uparrow~~~ & & ~~~ \downarrow \nabla \\ G & & H \\ \Delta\downarrow ~~~ && ~~~\uparrow\nabla \\ G \otimes G & \xrightarrow{g \otimes f} & H \otimes H \end{array}$$
For a family of group objects $G_p$ an orthogonal coproduct is a group object $G$ together with universal pairwise commuting morphisms $G_p \to G$. If $\mathcal{C}$ is nice enough, it always exists: If the family is finite, take the product. If not, take the directed colimit of the finite ones.
