Any homomorphism $f$ from $\mathbb{Z}$ to $G$ is determined by its value at 1: indeed $f(n) = f(1)^n$ for any $n\in \mathbb{Z}$, since $f$ is a group homomorphism (I am using multiplicative notation for the group operation on $G$). So it is natural to consider the map suggested by the book: given $f\in \text{Hom}(\mathbb{Z},G)$, evaluate it at 1: $k:f\mapsto f(1)$. It sends $f$ to an element of $G$, namely $f(1)$.
To check that this is a group homomorphism, you need to understand how $\text{Hom}(\mathbb{Z},G)$ is a group in the first place. That's very simple: the group operation is pointwise multiplication: the product of two homs $f$ and $g$ is given by $fg(n) = f(n)g(n)$ (to explain what $fg$ is you need to evaluate it on an arbitrary input, since you are describing a homomorphism). So now, you should have no difficulties verifying that $k$ respects the group structure.