If we have a pair of Abelian groups $G$ and $H$, I have been taught to compute the corresponding $\textrm{Ext}(G,H)$ groups in the following manner:
We find a free resolution of $G$; i.e. a couple of free Abelian groups $F_0$ and $F_1$ and corresponding homomorphisms $f_0$ and $f_1$ so that:
$$ 0 \to F_1 \stackrel{f_1}\to F_0 \stackrel{f_0}\to G \to 0 $$
is a short exact sequence.
We then dualise with respect to $H$, to get the dual sequence:
$$ 0 \to \textrm{Hom}(G,H) \stackrel{f_0^*}\to \textrm{Hom}(F_0,H) \stackrel{f_1^*}\to \textrm{Hom}(F_1,H) \to 0, $$
where $f_0^*$ and $f_1^*$ represent the naturally induced dual maps.
The corresponding Ext groups are then defined as:
$$ \textrm{Ext}^0(G,H) := \textrm{Ker}(f_1^*) $$
and
$$ \textrm{Ext}^1(G,H) := \textrm{Coker}(f_1^*). $$
An example: We compute $\textrm{Ext}(\mathbb{Z}_p,\mathbb{Z})$:
We note that:
$$ 0 \to \mathbb{Z} \stackrel{\cdot p}\to \mathbb{Z} \stackrel{1 \mapsto 1}\to \mathbb{Z}_p \to 0 $$
is a free resolution of $\mathbb{Z}_p$. We then dualise with respect to $\mathbb{Z}$ to obtain:
$$ 0 \to \textrm{Hom}(\mathbb{Z}_p,\mathbb{Z}) \to \textrm{Hom}(\mathbb{Z},\mathbb{Z}) \stackrel{\cdot p^*}\to \textrm{Hom}(\mathbb{Z},\mathbb{Z}) \to 0, $$
which, noting that $\cdot p^* = \cdot p$, reduces to:
$$ 0 \to 0 \to \mathbb{Z} \stackrel{\cdot p}\to \mathbb{Z} \to 0. $$
Hence:
$$ \textrm{Ext}^0(\mathbb{Z}_p,\mathbb{Z}) := \textrm{Ker}(\cdot p) = 0 $$
and
$$ \textrm{Ext}^1(\mathbb{Z}_p,\mathbb{Z}) := \textrm{Coker}(\cdot p) = \mathbb{Z}/p\mathbb{Z}. $$
But now to the point: I want to compute $\textrm{Ext}(\mathbb{Z}_m,\mathbb{Z}_n)$.
For the sake of simplicity, let us first compute $\textrm{Ext}(\mathbb{Z}_p,\mathbb{Z}_q)$ for $p$ and $q$ distinct primes.
A free resolution for $\mathbb{Z}_p$ is given, as above, by:
$$ 0 \to \mathbb{Z} \stackrel{\cdot p}\to \mathbb{Z} \stackrel{1 \mapsto 1}\to \mathbb{Z}_p \to 0 $$
Dualising with respect to $\mathbb{Z}_q$ gives us:
$$ 0 \to \textrm{Hom}(\mathbb{Z}_p,\mathbb{Z}_q) \to \textrm{Hom}(\mathbb{Z},\mathbb{Z}_q) \stackrel{\cdot p^*}\to \textrm{Hom}(\mathbb{Z},\mathbb{Z}_q) \to 0, $$
which necessarily must reduce to:
$$ 0 \to 0 \to 0 \stackrel{0}\to 0 \to 0, $$
so that:
$$ \textrm{Ext}^0(\mathbb{Z}_p,\mathbb{Z}_q) := \textrm{Ker}(0) = 0 $$
and
$$ \textrm{Ext}^1(\mathbb{Z}_p,\mathbb{Z}_q) := \textrm{Coker}(0) = 0. $$
Now for the more general $\textrm{Ext}(\mathbb{Z}_m,\mathbb{Z}_n)$. We have a free resolution of $\mathbb{Z}_m$ given by:
$$ 0 \to \mathbb{Z} \stackrel{\cdot m}\to \mathbb{Z} \stackrel{1 \mapsto 1}\to \mathbb{Z}_m \to 0. $$
Dualising with respect to $\mathbb{Z}_n$ yields:
$$ 0 \to \textrm{Hom}(\mathbb{Z}_m,\mathbb{Z}_n) \to \textrm{Hom}(\mathbb{Z},\mathbb{Z}_n) \stackrel{\cdot m^*}\to \textrm{Hom}(\mathbb{Z},\mathbb{Z}_n) \to 0, $$
which reduces to:
$$ 0 \to \mathbb{Z}_d \to 0 \stackrel{0}\to 0 \to 0, $$
where $d := \textrm{gcd}(m,n)$.
Hence, we again get trivial Ext groups.
Now I know that the answer should be $\textrm{Ext}^1(\mathbb{Z}_m,\mathbb{Z}_n) = \mathbb{Z}_d$. This agrees with what we saw earlier, as $\gcd(p,q) = 1$.
I would much appreciate it if someone could tell me what I am doing wrong.
Many thanks.
Addendum: Grazie to Maxime Ramzi and Captain Lama for pointing out my mistake.
I will here complete the computation, for the benefit of posterity:
First the $p,q$ prime case:
A free resolution for $\mathbb{Z}_p$ is given, as above, by:
$$ 0 \to \mathbb{Z} \stackrel{\cdot p}\to \mathbb{Z} \stackrel{1 \mapsto 1}\to \mathbb{Z}_p \to 0 $$
Dualising with respect to $\mathbb{Z}_q$ gives us:
$$ 0 \to \textrm{Hom}(\mathbb{Z}_p,\mathbb{Z}_q) \to \textrm{Hom}(\mathbb{Z},\mathbb{Z}_q) \stackrel{\cdot p^*}\to \textrm{Hom}(\mathbb{Z},\mathbb{Z}_q) \to 0, $$
which becomes:
$$ 0 \to 0 \to \mathbb{Z}_q \stackrel{\cdot p^*}\to \mathbb{Z}_q \to 0. $$
Noting that $\cdot p^*: \mathbb{Z}_q \to \mathbb{Z}_q$ is a bijection, we get:
$$ \textrm{Ext}^0(\mathbb{Z}_p,\mathbb{Z}_q) := \textrm{Ker}(\cdot p^*) = 0 $$
and
$$ \textrm{Ext}^1(\mathbb{Z}_p,\mathbb{Z}_q) := \textrm{Coker}(\cdot p^*) = 0. $$
Now again for the more general $\textrm{Ext}(\mathbb{Z}_m,\mathbb{Z}_n)$. We have a free resolution of $\mathbb{Z}_m$ given by:
$$ 0 \to \mathbb{Z} \stackrel{\cdot m}\to \mathbb{Z} \stackrel{1 \mapsto 1}\to \mathbb{Z}_m \to 0. $$
Dualising with respect to $\mathbb{Z}_n$ yields:
$$ 0 \to \textrm{Hom}(\mathbb{Z}_m,\mathbb{Z}_n) \to \textrm{Hom}(\mathbb{Z},\mathbb{Z}_n) \stackrel{\cdot m^*}\to \textrm{Hom}(\mathbb{Z},\mathbb{Z}_n) \to 0, $$
which becomes:
$$ 0 \to \mathbb{Z}_d \to \mathbb{Z}_n \stackrel{\cdot m^*}\to \mathbb{Z}_n \to 0, $$
where $d := \textrm{gcd}(m,n)$.
Hence:
$$ \textrm{Ext}^0(\mathbb{Z}_m,\mathbb{Z}_n) := \textrm{Ker}(\cdot m^*) = \mathbb{Z}_d $$
and
$$ \textrm{Ext}^1(\mathbb{Z}_m,\mathbb{Z}_n) := \textrm{Coker}(\cdot m^*) = \mathbb{Z}_d. $$
Right?