Asaf has answered the cardinality part of your question. As to why the direct sum has a group structure, this is an instance of a more general fact: any direct sum of groups has a group structure. Namely, if $H=\bigoplus_{i\in I}G_i$, then there is a natural binary operation on $H$: given two elements $h_1,h_2$ of $H$, we "multiply them componentwise," using the $G_i$-multiplication on the $G_i$th coordinate, and this operation satisfies the group axioms.
I'm using "multiply" here since the word "add" is usually reserved for abelian groups; of course, in this instance the groups involved are abelian, but I think it's a bit better to be more general.
So what about your specific example? Well, $I$ here is just $\kappa$, and certainly $\mathbb{Z}$ has an obvious group structure ...
OK, now let me say a bit about the formal details, since if you haven't seen it before the above idea can seem a bit glib:
"Multiply componentwise" is easy to think about when our index set $I$ is $\mathbb{N}$, since then an element of $H$ is literally a sequence. In general, an element of $H$ is an "$I$-indexed sequence," and the right definition of these turns out to be that an $I$-indexed sequence is just a function with domain $I$ (the "$i$th term" is the value of the function on $i$). And the elements of $H$ are $I$-indexed sequences with appropriate values, that is, a function $f$ with domain $I$ is an element of $H$ if
For each $i\in I$, $f(i)\in G_i$ (so it really is a "sequence of elements from the $G_i$s"), and
For all but finitely many $i\in I$, $f(i)=e_{G_i}$ (this is the direct sum condition, that all but finitely many coordinates be trivial; if we drop this condition we get the direct product instead).
And the "multiply componentwise" function on $H$ is now defined as follows: given $f_1, f_2\in H$, we let $f_1*f_2$ be defined by $$(f_1*f_2)(i)=f_1(i)*_{G_i}f_2(i).$$
It's now a good exercise to check that $H$ with this operation is indeed a group.