Here is the difference between "direct products" and "direct sums" (we will deal with the two-factor case, first).
Suppose we have two (right) $R$-modules $M$ and $N$. They may have nothing to do with each other; for example $M$ might be the abelian group $\Bbb Z_4$ and $N$ might be the additive subgroup of $\Bbb R[x]$.
From these, we create a "bigger" $R$-module: $M \times N$. In the example I gave above, an element of $M \times N$ might look like:
$([3],x^2 + 2)$
Another element might be: $([2],x^3 - 1)$. We can add these:
$([3],x^2 + 2) + ([2],x^3 - 1) = ([1],x^3 + x^2 + 1)$
and "scale" them by any integer:
$([3],x^2 + 2)\cdot (-17) = ([1],-17x^2 - 34)$
This is the "external direct product", in effect we treat $M$ and $N$ as if they live "in different worlds". This product comes with two "factor maps":
$M \times N \to M$ ("only look at $M$")
$M \times N \to N$ ('only look at $N$").
By contrast, note that we might have a (right) $R$-module $K$ with SUBMODULES $M'$ and $N'$ such that:
$K = M' + N'$ ($M'$ and $N'$ GENERATE $K$)
$M' \cap N' = \{0\}$
so that $K$ splits "cleanly" into an "$M'$-component" and an "$N'$-component". This is an "internal direct sum decomposition", we START with the larger thing, and resolve it into two smaller things.
If it happened to be the case that $K = M \times N$, say as in our example above, then:
$M' = \{([k],0): k \in \Bbb Z\}$
$N' = \{[0],f(x): f(x) \in \Bbb R[x]\}$.
Note $M$ and $M'$ (and similarly with the $N$'s) are not "too much different". Note also, that although this is ONE way to decompose $K$, it may not be the ONLY way; an "external" construction is going to be "essentially unique", but an internal decomposition may NOT be.
For example, consider the $\Bbb Z$-module $\Bbb Z_2 \times \Bbb Z_2$.
We can write this as an INTERNAL direct sum $\Bbb Z_2 \times \Bbb Z_2 = A \oplus B$ by taking:
$A = \Bbb Z_2 \times \{0\}$
$B = \{0\} \times \Bbb Z_2$
but we can ALSO write this as the internal direct sum:
$\Bbb Z_2 \times \Bbb Z_2 = A \oplus C$, where:
$C = \{(0,0),(1,1)\}$. For clarity's sake, let's write:
$(1,0) = a_1$
$(1,1) = c_1$.
Then the unique $A\oplus C$ forms of $\Bbb Z_2 \times \Bbb Z_2$ are:
$(0,0) = 0a_1 + 0c_1$
$(1,0) = 1a_1 + 0c_1$
$(0,1) = 1a_1 + 1c_1$
$(1,1) = 0a_1 + 1c_1$
Note $B$ is not the same submodule as $C$.
**********************
If we start with the "smaller things", and make a "conglomerate", the properties the "conglomerate" has should be defined in terms of mappings of the "conglomerate" to the "pieces".
On the other hand, if we start with the "larger thing", and somehow "chop it up", these pieces should have well-defined "places" within the "larger thing".
This may seem "backwards", but it turns out to be "the right way to do it" for generalizing to an infinite number of "factors".
To see why the distinction becomes necessary, let's look at a "simple" infinite case.
Suppose we have countably infinitely many copies of $\Bbb Z$. We can make this into a "super-module" containing each copy (in its own "coordinate-space"), by regarding the elements of our "super-module" as infinite sequences of integers:
$m = (k_1,k_2,k_3,\dots)$
If you think about it, $m$ is just a function $\Bbb Z^+ \to \Bbb Z$:
$n \mapsto k_n$.
We can add these functions "point-wise":
$(m+m')(n) = m(n)+m'(n)$, or, perhaps more typically:
$(k_1,k_2,k_3,\dots) + (k_1',k_2',k_3',\dots) = (k_1+k_1',k_2+k_2',k_3+k_3',\dots)$
It is clear that if we "just look at the $i$-th coordinate" (for any $i \in \Bbb Z^+$), all we see is "something that behaves like the integers".
So far, so good, this all seems straight-forward. But suppose that we were given the "super-module" to start with as:
$M = \{f: \Bbb Z^+ \to \Bbb Z\}$, a set of functions.
Suppose we want to find submodules $A_1,A_2,A_3,\dots$ with:
1)$\displaystyle M = \sum_{i = 1}^{\infty} A_i$
2)$A_i \cap (A_1 +\cdots A_{i-1} + A_{i+1} + \cdots) = \{0\}$, for each $i$.
In other words, we want to try to find a(n internal) direct sum decomposition of $M$. At first glance, this does not appear too hard.
Here's the trouble, we would like there to be a UNIQUE representation:
$m = a_1 + a_2 + a_3 + \cdots$, with each $a_i \in A_i$.
We're going to have trouble with this: we can't "evaluate" the above sum, because it never "ends". How are we going to show equality?
We CAN do this, but only if we consider a smaller portion of $M$, namely, functions with finite support (that is: functions such that $f(n) = 0$ for all but finitely many $n$).
In other words, we can "add infinite things" (to each other), but we can't "add infinitely". If you recall from calculus, "infinite series" are not, in and of themselves, MEANINGFUL, what is meaningful is the LIMIT of the PARTIAL SUMS, and each of those partial sums is FINITE.
Now in a module, in general, we don't have any way to check "convergence" (these problems pop up in infinite-dimensional vector spaces, as well), so even if we have "infinitely many coordinates"; to define SUMS, we must have a finite number of SUMMANDS. So our usual approach to defining the direct sum FAILS when we have infinitely many modules to "sum up".
***********************
You can also think of it this way: the direct sum is generated by the summands, in such a way that they are "independent". It's MINIMAL, in some sense.
The direct product, on the other hand, is "everything and the kitchen sink, too".
***********************
Another way to better understand a direct product is in terms of the "canonical projection maps". These possesses a universal mapping property which defines (up to isomorphism) the direct product.
The relevant property is this:
A direct product $M$ of modules $M_i$ (where $i \in I$, an arbitrary indexing set) is a $I$-indexed family of module homomorphisms:
$\pi_i: M \to M_i$ such that, for ANY module $N$, and an $I$-indexed family of homomorphisms:
$f_i: N \to M_i$
there is a UNIQUE mapping:
$\phi:N \to M$ such that $f_i = \pi_i \circ \phi$ for all $i \in I$.
this unique mapping is often denoted $\prod f_i$.
If one thinks of $\pi_i$ as "picking out the $i$-th coordinate", then what $\phi$ does is "put the value of $f_i$ in the $i$-the coordinate place".
With a direct SUM, we "reverse the arrow-direction", a direct sum is a module $M$ and an $I$-indexed family of module homomorphisms:
$\iota_i: M_i \to M$
such that if $N$ is any other module, with an $I$-indexed family of homomorphisms:
$g_i: M_i \to N$
there is a unique homomorphism $\psi:M \to N$ such that $f_i = \psi \circ \iota_i$, for all $i \in I$.
The mapping $\psi$ is often written $\oplus f_i$.
Surprisingly enough, the direct product of an infinite indexed set, together with the usual inclusions, is NOT a direct sum. To see this, consider the following example:
Suppose we have: $\displaystyle M = \prod_{n \in \Bbb N} F$, where $F$ is a field, and $N = F[x]$. So $M$ is the $F$-module of all infinite sequences in $F$.
Define $f_n: F \to N$ by $f_n(a) = ax^n$.
The usual inclusions are:
$\iota_n: F \to M$ by $\iota_n(1) = (0,\dots,0,1,0,\dots)$ where $1$ is in the $n$-th place, and everything else is 0. Let's call this $e_n$.
Now $\displaystyle m = \sum_{n= 0}^{\infty} e_n \in M$, so $\psi(m) \in F[x]$. Suppose $\text{deg}(\psi(m)) = k$.
Now we must have: $\psi(e_n) = \psi(\iota_n(1)) = f_n(1) = x^n$, for every $n$, by the UMP of a direct sum. So, for example:
$\psi(e_{k+1}) = x^{k+1}$.
But this means $\psi(m)$ has non-zero terms of ALL degree, there is no $k$ that will work.