Q:

Can someone explain the precise difference between of direct sum and direct product of groups?

As far as I know, the direct product of groups $G_1, \dots , G_n$ is the group with the underlying set being the cartesian product and the operation done component wise.  It's not clear to me what a direct sum of groups $G_1, \dots ,G_n$ really means. Wikipedia makes it sound like the term "direct sum" is used to refer to the direct product of abelian groups.
Some clarification would be appreciated.

A:

The direct sum of a family $\{G_i:i\in I\}$ of groups is the same as the direct product when $I$ is finite. When $I$ is infinite, however, the direct sum is a proper subgroup of the direct product: it’s the set of $g\in\prod_{i\in I}G_i$ such that $g_i=1_{G_i}$ for all but at most finitely many $i\in I$.

A:

There is the unrestricted and restricted direct product.
It seems to me that it is most usual (e.g. as in the post by Brian Scott) to call "direct product" the unrestricted one and "direct sum" the unrestricted one, but some people (notably Russian) call "direct product" the restricted one and "cartesian product" the unrestricted one. Also some people (such as Serre) say that "direct sum" is meaningless because it is not a coproduct in the category of groups (unlike the unrestricted direct product of modules over a given ring). Besides, I think there was an attempt by Bourbaki to promote "free sum" to mean "free product" but it seems that "free product" is almost universal now. 

