Here is the homological algebra perspective on the problem.
First, let us compute $\operatorname{Ext}^*(Z/p^n,Z/p^m)$. Abelian groups are the same thing as $\mathbb{Z}-modules, and we have a free resolution
$0\longrightarrow \mathbb Z \stackrel{p^n}{\longrightarrow} \mathbb{Z} \dashrightarrow \mathbb Z/p^n\longrightarrow 0$
In general, We can compute $\operatorname{Ext}_R^*(A,B)$ by taking a projective resolution of $A$ and applying the contravariant functor $\hom_R(?,B)
In our case, if we apply \hom_{\mathbb Z}(?,\mathbb Z/p^m)$ we get
$ \mathbb Z/p^m \stackrel{p^n}{\longrightarrow} \mathbb{Z}/p^m $
where we have used the isomorphism $\hom_{\mathbb Z}(\mathbb Z,M)\cong M$. Thus $\operatorname{Ext}^1(\mathbb Z/p^n,\mathbb Z/p^m)= (\mathbb{Z}/p^m)/p^n(\mathbb{Z}/p^m).
There are now several details that I am going to skip (see a text on homological algebra, such as Weibel or Rotman), but each element of \operatorname{Ext}^*(Z/p^n,Z/p^m)$ will give rise to a map $\mathbb{Z}\to \mathbb{Z}/p^m$, and every extension will come from taking the pushout of this map with the map $\mathbb Z \stackrel{p^n}{\longrightarrow} \mathbb{Z}.
Unfortunately, there are a few details that need to be worked out to answer the question fully. In particular,
- What possible maps do we get? Some maps might not correspond to extensions.
- When do two different maps yield the same extension?
- When do two different extensions yield the same group A?
Still, we have a partial answer (which can with a little bit of work be extended to a complete answer) that every A$ is of the form $\operatorname{coker}(\mathbb{Z}\to\mathbb{Z}\oplus \mathbb{Z}/p^m)$ where the map on the first coordinate is multiplication by $p^n$.