Jim's answer gives you everything you need, but let me try to draw the bigger picture in other words.
What you are looking at is a short exact sequence, i.e. an exact sequence of the form
$$0\to A\xrightarrow{f} B\xrightarrow{g} C\to 0$$
This means you have three abelian groups and all arrows are group homomorphisms. Exactness means that at any given point in the sequence the kernel of the exiting map coincides with the image of the entering map. In particular this means that the kernel of $f$ is zero, i.e $f$ is injective. Similarly the image of $g$ is the whole of $C$, so $g$ is surjective. Moreover the kernel of $g$ is the image of $f$. But since $f$ is injective you can identify $A$ with its image, so $Ker(g)\cong A$.
In your intial example you have $B=G$, $C=\mathbb Z$ and $A=ker(G\to \mathbb Z)$.
Now a short exact sequence is called split if one of the following equivalent properties hold:
a) $$B\cong A\oplus C$$
b) There exists a group homomorphism $i:C\to B$ such that $g\circ i=id$
c) There exists a group homomorphism $p:B\to A$ such that $p\circ f=id$.
So the direct way of showing that $G\cong \mathbb Z\oplus ker(G\to \mathbb Z)$ would be constructing a map $\mathbb Z\to \mathbb G$ which satisfies property b).
A more general argument uses the definition of projectiveness:
An $R$-module $P$ (all abelian groups are $\mathbb Z$-modules) is called projective if for any surjective $R$-module homomorphism (homomorphism of abelian groups) $f:N\to M$ and any $R$-module homomorphism $g:P\to M$ there exists a lift $h:P\to N$ such that $f\circ h=g$.
Now you can show that $P$ is projective if and only if any short exact sequence of the form
$$0\to A\xrightarrow{f} B\xrightarrow{g} P\to 0$$
splits.
You can also show that all free modules (the abelian group $\mathbb Z$ is clearly free as a module over itself) are projective.