Please look at the chapter on semisimplicity in Lang's ALgebra, discussion preceding Theorem 4.3, where a semisimple ring $R$ is proven to be the direct sum of certain two sided ideals $R_1,\ldots,R_s$.
Furthermore, $x=e_1x+\ldots+e_sx$. This proves that there is no index other than $i=1,\ldots,s$ and also that the $i$-th component $x_i$ is uniquely determined as $e_ix=e_ix_i$. Hence the sum $R=R_1+\ldots+R_s$ is direct, and furthermore, $e_i$ is a unit element of $R_i$, which is therefore a ring. Since $R_iR_j=0$ for $i \neq j$, we find that in fact $$R=\prod\limits_{i=1}^{s}R_i$$ is a direct product of the rings $R_i$.
1) I cannot quite see how the argument proves that the sum is direct.
2) It seems that the decomposition of the identity of $R$ as the sum $e_1+\ldots+e_s$ is assumed to be unique (or not?). Could you elaborate on the possibility of writing $1$ in a different decomposition, say $e_{\alpha_1}+\ldots+e_{\alpha_n}$ and the consequences?
3) I cannot see what is meant by "$e_i$ is a unit element of $R_i$".
4) Because there are only finitely many $R_i$'s, isn't $R_1 \oplus \ldots \oplus R_s$ automatically equal to $R_1 \times \ldots \times R_s$? Why was the observation that $R_iR_j=0$ needed?
I would be grateful for any help. Thanks!
The lines above where you start to copy from Lang say
This takes an arbitrary representation of $x\in R$ as a sum of elements $x_i$ in each $R_i$, and shows that $x_i = e_i x_i = e_i x$. So the presentation is unique, which shows that the sum is direct.
The argument above also applies to $x = 1$, which shows that the decomposition $1 = e_1+\dots+e_s$ is unique. Nowhere before that did it assume that the presentation of $1$ was unique, only that it existed.
The last line I quoted in the first part of the answer shows that $e_i$ acts as the identity on $R_i$; that is, that $x_i = e_i x_i$ for any $x_i\in R_i$. This shows (modulo details to show that $x_i = x_i e_i$) that $e_i$ satisfies the axioms for a unity element in $R_i$. As the only ring axiom not satisfied by an arbitrary ideal is the inclusion of a $1$, this shows that the ideal $R_i$ is a ring itself with $1 = e_i$.
I believe this last confusion is coming from the difference between the external direct product and internal product. When Lang writes $R = \prod_{i = 1}^s R_i$, it seems that the claim is really that $R\cong\prod_{i = 1}^s R_i$ and $R = R_1\cdot\dots\cdot R_s$. That is, $\{\prod_{i = 1}^s r_i\mid r_i\in R_i\textrm{ or }r_i = 1\}\cong R_1\times\dots\times R_s$. The statement is that the internal product of the $R_i$'s is in fact a direct product.