How do I prove that $\phi:\mathbb{Z}\rightarrow\mathbb{Z}_n$ is a homomorphism? I was wondering how one shows that $\phi(m):\mathbb{Z}\rightarrow\mathbb{Z}_n$ is a homomorphism? I know that we define $m:=qn + r$, but I don't really know how to continue from there.

You have $m=qn + r,$ and there you should mention that $r\in\{0,1,2,\ldots,n-1\}.$
The homomorphism would be $\varphi(m) = r.$
Showing that that is a homomorphism means showing that $\varphi(m_1+m_2) = \varphi(m_1)+\varphi(m_2).$
That means if $m_1 = q_1 n + r_1$ and $m_2 = q_2 n + r_2$ and $m_1+m_2 = q_3 n + r_3$ then $r_1+r_2\equiv r_3\pmod n.$ That means $(r_1+r_2)-r_3$ is a multiple of $n.$ So observe that
$$
r_1+r_2-r_3 = (q_1+q_2-q_3) n.
$$
