Let $A,B$ be $R$-modules. The direct sum $A\oplus B= \{(a,b) | a\in A, b\in B \}$ is a module under component wise operations: $(a_1,b_1)+(a_2,b_2)=(a_1+a_2,b_1+b_2)$ and $r(a,b)=(ra,rb)$.
This extends to a direct sum of finitely many $R$-modules. However, for a direct sum of infinitely many $R$-modules, there is a further requirement that elements have all but finitely many components equal to $0$.
Let's clear up some things from the comments. For categorical reasons, writing a direct product of rings $R\times S$ as a direct sum $R\oplus S$ might be misleading since $R\times S$ is not a coproduct, although in the case of algebras they are in particular vector spaces which we like writing $\oplus$ for, so in the context of algebras we might use $\oplus$ too. However we even use $\oplus$ for vector space decompositions of algebras (in order to signify grading), such as $\mathbb{C}[x]=\mathbb{C}\oplus\mathbb{C}x\oplus\mathbb{C}x^2\oplus\cdots$. In this answer I will decide to use $\times$ for direct products of rings in order to distinguish it from internal vector space direct sum. Also, let's distinguish internal from external perhaps.
If $R$ and $S$ are any two rings, the external direct product $R\times S$ is the the set of all ordered pairs $(r,s)$ with $r\in R$ and $s\in S$ with "componentwise" multiplication $(r_1,s_1)(r_2,s_2)=(r_1r_2,s_1s_2)$. If we're talking about unital rings $R$ and $S$, then $(1_R,1_S)$ is the unique identity for $R\times S$, and the elements $e_R=(1_R,0_S)$ and $e_S=(0_R,1_S)$ are not identity elements.
Instead they are idempotents (i.e. $e^2=e$), they are central (so $ex=xe$ for all $x\in R\times S$) and they are orthogonal (since $e_Re_S=0_{R\times S}$). I'll leave you to verify my parenthetical statements as an exercise.
There are (non-unital) ring embeddings $R\to R\times S$ and $S\to R\times S$, in which (by abuse of notation) we may write $r$ when we mean $(r,0_S)$ or write $s$ when we mean $(0_R,s)$. In this case, the product $rs$ is short for $(r,0_S)(0_R,s)=(r\cdot0_R,0_S\cdot s)=(0_R,0_S)=0_{R\times S}$. In particular, elements of $R$ and $S$ are identified with zero divisors in $R\times S$. With this abuse of notation, multiplication-by-$e_R$ is just the projection map $R\times S\to R$, and multiplication-by-$e_S$ is the projection map $R\times S\to S$.
Now let's switch gears. Suppose $A$ is any rings, and $R$ and $S$ are subrings for which every $a\in A$ may be uniquely written as $a=r+s$ for some $r\in R$, $s\in S$. If in addition we have $rs=0$ for all $r\in R$ and $s\in S$, then we write $A=R\times S$ and we call $A$ an internal direct product of $R$ and $S$. Note that the external direct product $R\times S$ is an internal direct product of $R\times\{0_S\}$ and $\{0_R\}\times S$ under these definitions.
They're both ways of talking about the same thing, the difference is we use the term "internal" when we're viewing $R$ and $S$ as subrings of an already-existing algebra $A$, and we use the term "external" when we're creating a new algebra out of already-existing rings $R$ and $S$.
If $A$ is unital and $A=R\times S$ is an internal direct product, then $1_A=e_R+e_S$ for some unique elements $e_R\in R$ and $e_S\in S$. As an exercise, check that $e_R$ and $e_S$ are orthogonal, central idempotents. Next, check that $R:=e_RA$ and $S:=e_SA$ are ideals, and in particular they are subrings, and that $A=R\times S$ is an internal direct product. Third, verify that if $e\in R$ is a central idempotent, then $e$ and $1-e$ are orthogonal central idempotents. Finally, prove that if $1_A\in A$ is a primitive idempotent then $A$ is not the internal direct product $A=R\times S$ of any two subrings $R\times S$. (Here let's not assume subrings share the same identity element.)
In conclusion, for unital rings, direct factors correspond to central, orthogonal idempotents. Sorry for the entire chapter, but I thought you might like this theory.
Anyway, if $A$ is an algebra, then it is possible for $A$ to be the internal vector space direct sum $V\oplus W$ of subalgebras $V$ and $W$ without being an internal direct product $V\times W$ of subrings $V$ and $W$. For instance, if we don't care about having identity elements, $A=\mathbb{R}\times\mathbb{R}[\varepsilon]/(\varepsilon^2)$ is a vector space direct sum of subalgebras $V=\mathbb{R}\times\mathbb{R}$ and $W=\{0\}\times\mathbb{R}\varepsilon$ but it is not a direct product of them as subrings, since $(0,1)$ is not orthogonal to $(0,\varepsilon)$. However it is a direct product of subrings $Y=\mathbb{R}$ (the first component) and $X=\mathbb{R}[\varepsilon]/(\varepsilon^2)$. Notice that $\dim V=\dim X=2$ and $\dim W=\dim Y=1$ but $X\not\cong V$ as algebras.
Best Answer
The first definition is of an external direct sum, whereas the second definition is of an internal direct sum. See here, for example. These definitions are isomorphic.
The external direct sum does result in tuples. The dimension in this case sum since the tuples are the result of the Cartesian product of the basis vectors.
External direct sums builds up new vector spaces. For example, the vector space of polynomials of the form $a_0+a_1x+a_2x^2$ has basis $V=\left\{1,x,x^2\right\}$ can be direct summed to the vector space of polynomials of the form $b_3x^3+b_4x^4+b_5x^5$ with basis $W=\left\{x^3,x^4,x^5 \right\}$ to yield the vector space $V \oplus W$ of polynomials of the form $c_0+c_1x+c_2x^2+c_3x^3+c_4x^4+c_5x^5$ of dimension $\small \text{dim}(V) + \text{dim}(W)=6.$
The vector spaces added in the external direct sum $V$ and $W$ do not belong to the sum. For instance the associated vector space to $\mathbb R^2$ can be direct summed to $\mathbb R^3$ to yield $\mathbb R^5.$ The basis vectors of this external direct sum are represented in a block matrix (assuming the standard basis for each one) - the basis vectors of $\mathbb R^2$ are "padded" with three added zeros at the bottom, while the basis vectors of $\mathbb R^3$ need two added zeros at the top:
$$\small\begin{bmatrix}1&0&&&\\0&1&&&\\&&1&0&0\\&&0&1&0\\&&0&0&1 \end{bmatrix}$$
The dimension stays unchanged in the interior direct sum if $V$ and $W$ are subspaces without intersection other than the zero vector.
Example: In this case $V$ may be the subspace of $\mathbb R^3$ given by vectors of the form $\small\begin{bmatrix}a\\b\\0 \end{bmatrix}$ and $W$ be the subgroup of vectors of the form $\small\begin{bmatrix}0\\0\\c \end{bmatrix}.$ The internal direct sum will span the ambient space, and be formed by vectors of $\small\begin{bmatrix}a\\b\\0 \end{bmatrix} + \small\begin{bmatrix}0\\0\\c \end{bmatrix}=\small\begin{bmatrix}a\\b\\c \end{bmatrix}$ where $a,b,c\in \mathbb R.$