Why is $\operatorname{Tor}(\mathbb{Z}_m,\mathbb{Z}_n) \cong \mathbb{Z}_{\operatorname{gcd}(m,n)}$? [duplicate]

You have the free resolution $\dots\to 0\to \mathbb Z\xrightarrow{m}\mathbb Z\to\mathbb Z/m\to 0$.

Now, ignore the last term and tensor with $\mathbb Z/n$:

$$\dots\to0\to \mathbb Z\otimes\mathbb Z/n\xrightarrow{m\otimes 1_{\mathbb Z/n}}\mathbb Z\otimes\mathbb Z/n\to 0\to\cdots,$$ which is isomorphic (as an exact sequence) to

$$\dots\to0\to\mathbb Z/n\xrightarrow{m}\mathbb Z/n\to 0\to\cdots.$$ Now $\mathrm{Tor}^\mathbb Z_1(\mathbb Z/m,\mathbb Z/n)$ is the homology at the first term, which is

$$\ker(m)=\frac n{\gcd(m,n)}\mathbb Z/n\cong\mathbb Z/\gcd(m,n).$$