I'm following the proof of Exercise 2.1.14, proposition 0.1:
For abelian group $A$, $0 \to \mathbb Z_{p^m} \to A \to \mathbb Z_{p^n} \to 0$ is exact
$\iff$ $A \cong \mathbb{Z}_{p^k} \times \mathbb{Z}_{p^{m+n-k}}$ where $0 \leqslant k \leqslant \operatorname{min}(m,n)$.
To prove $(\implies)$, it first writes a diagram
$$ \begin{array}{ccc} 0 &\longrightarrow & \mathbb Z_{p^m} & \longrightarrow & \mathbb Z_{p^m} \times \mathbb Z & \longrightarrow & \mathbb Z & \longrightarrow & 0\\ & &\| & & \downarrow & &\downarrow & \\ 0 & \longrightarrow & \mathbb Z_{p^m} & \longrightarrow & A & \longrightarrow & \mathbb Z_{p^n} & \longrightarrow & 0 \end{array} $$
and claims without proof that $$ \begin{array}{ccc} \mathbb Z_{p^m} \times \mathbb Z & \longrightarrow & \mathbb Z & \\ \downarrow & &\downarrow & \\ A & \longrightarrow & \mathbb Z_{p^n}\end{array} $$ is pull-back of $\mathbb Z \overset{\pi_1}{\to} \mathbb Z_{p^n}$ and $A \overset{\pi_2}{\to} \mathbb Z_{p^n}$, $\pi_2: A \to A/ (\mathbb Z_{p^m}) \cong \mathbb Z_{p^n}$.
My question:
$1$. Why is this diagram commutative?
Especially, why there exists a homomorphism $\mathbb Z_{p^m} \times \mathbb Z \to A$?
We know it's not true that homomorphism between middle terms of two exact sequences of abelian groups exists in general, for example
$$ \begin{array}{ccc} 0 &\longrightarrow & \mathbb Z_{2} & \longrightarrow & \mathbb Z_{2} \times \mathbb Z_2 & \longrightarrow & \mathbb Z_2 & \longrightarrow & 0\\ \| & &\| & & & & \| & &\| \\ 0 & \longrightarrow & \mathbb Z_{2} & \longrightarrow & \mathbb Z_4 & \longrightarrow & \mathbb Z_{2} & \longrightarrow & 0 \end{array} $$
Otherwise from 5-lemma, $\mathbb Z_2 \times \mathbb Z_2 \cong \mathbb Z_4$, which is impossible.
$2$. Why is the block the pull-back diagram?
In mod category, we know the pullback of $\mathbb Z \overset{\pi_1}{\to} \mathbb Z_{p^n}$ and $A \overset{\pi_2}{\to} \mathbb Z_{p^n}$ is
$\{(m,n)\in A \times \mathbb Z \mid \pi_1(n)=\pi_2(m)\}$.
Thanks for your time and effort.
We start with the following exact sequence:
$$\require{AMScd} \begin{CD} 0 @>>> {\mathbb{Z}_{p^m}} @>f>> A @>{\pi_2}>> {\mathbb{Z}_{p^n}} @>>> 0 \end{CD} $$
Since this is exact, we get that $\pi_2$ is surjective. Pick an $a\in A$ with $\pi_2(a)=1$. Now we can define a map $g:\mathbb{Z}_{p^m}\times\mathbb{Z}\to A$, by letting $g(x,y)=f(x)+y\cdot a$ for all $x\in\mathbb{Z}_{p^m}$, $y\in\mathbb{Z}$. You can now check that the following diagram commutes:
$$\require{AMScd} \begin{CD} 0 @>>> {\mathbb{Z}_{p^m}} @>i>> {\mathbb{Z}_{p^m}\times\mathbb{Z}} @>p>> {\mathbb{Z}} @>>> 0 \\ @. @| @VVgV @VV{\pi_1}V @. \\ 0 @>>> {\mathbb{Z}_{p^m}} @>f>> A @>{\pi_2}>> {\mathbb{Z}_{p^n}} @>>> 0 \\ \end{CD} $$
where $i:\mathbb{Z}_{p^m}\to\mathbb{Z}_{p^m}\times\mathbb{Z}$ is the map that sends $x\mapsto(x,0)$ for all $x\in\mathbb{Z}_{p^m}$; and $p:\mathbb{Z}_{p^m}\times\mathbb{Z}\to\mathbb{Z}$ is the map that sends $(x,y)\mapsto y$ for all $(x,y)\in\mathbb{Z}_{p^m}\times\mathbb{Z}$, and $\pi_1:\mathbb{Z}\to\mathbb{Z}_{p^n}$ is the map that sends $n\mapsto n$ for all $n\in\mathbb{Z}$. In other words $\pi_1$ is the mod $p^n$ reduction homomorphism.
I hope the above provides a sufficient answer to your first question. For your second question, recall that a pullback of $f:X\to Z$ and $g:Y\to Z$, is a triple $(P,p_1,p_2)$ where $p_1:P\to X$ and $p_2:P\to Y$ such that
$$\require{AMScd} \begin{CD} P @>{p_2}>> Y \\ @VV{p_1}V @VgVV \\ X @>f>> Z \\ \end{CD} $$
commutes and $(P,p_1,p_2)$ is universal with respect to this property. This means that if $(Q,q_1,q_2)$ is another triple with
$$\require{AMScd} \begin{CD} Q @>{q_2}>> Y \\ @VV{q_1}V @VgVV \\ X @>f>> Z \\ \end{CD} $$
commuting, then there is a unique $u:Q\to P$ such that $q_1=p_1\circ u$ and $q_2=p_2\circ u$. Pull-backs are unique up to a unique isomorphsim, so you will often see people write "the pull-back".
In the link you attached, the diagram
$$\require{AMScd} \begin{CD} {\mathbb{Z}_{p^m}\times\mathbb{Z}} @>p>> {\mathbb{Z}} \\ @VVgV @VV{\pi_1}V \\ A @>{\pi_2}>> {\mathbb{Z}_{p^n}} \\ \end{CD} $$
was described as "the pull-back" of $A\overset{{\pi_2}}{\to}\mathbb Z_{p^n}$ and $\mathbb{Z}\overset{\pi_1}{\to}\mathbb Z_{p^n}$.
In your post you noted that the pullback should be
$$\require{AMScd} \begin{CD} P @>{p_2}>> {\mathbb{Z}} \\ @VV{p_1}V @VV{\pi_1}V \\ A @>{\pi_2}>> {\mathbb{Z}_{p^n}} \\ \end{CD} $$
Where $P=\{(m,n)\in A\times\mathbb{Z}\,|\,\pi_2(m)=\pi_1(n)\}$, and $p_1$ sends $(m,n)\mapsto m$ and $p_2$ sends $(m,n)\mapsto n$.
Really, these are both pullbacks, so we should be able to find a "nice" isomorphism $h:\mathbb{Z}_{p^m}\times\mathbb{Z}\to P$. For $h$ to be "nice", we must have that $h$ satisfies $g=p_1\circ h$ and $p=p_2\circ h$, and we must also have that $h^{-1}$ satisfies $p_1=g\circ h^{-1}$ and $p_2=p\circ h^{-1}$.
You can check that $h=f\times\mathrm{Id}_{\mathbb{Z}}$ is the appropriate isomorphism. To confirm this, you will need to use the fact that $f$ is injective, which you can get from the original exact sequence.
Edit: The last paragraph of my previous answer was incorrect. We should define the isomorphism $h:\mathbb{Z}_{p^m}\times\mathbb{Z}\to P$ as follows: for all $(x,y)\in\mathbb{Z}_{p^m}\times\mathbb{Z}$,
$$\text{let }h(x,y)=\left(g(x,y),y\right).$$
This formula gives us a map $h:\mathbb{Z}_{p^m}\times\mathbb{Z}\to A\times\mathbb{Z}$, and you can check that $h(x,y)\in P$, for all $(x,y)\in\mathbb{Z}_{p^m}\times\mathbb{Z}$, so that $h:\mathbb{Z}_{p^m}\times\mathbb{Z}\to P$. You can also check that $h$ satisfies $g=p_1\circ h$ and $p=p_2\circ h$.
To show that $h$ is invertible, we'll define another map $k$ and show that $k=h^{-1}$ and that $k$ satisfies $p_1=g\circ k$ and $p_2=p\circ k$. Before we do so, I'd like to introduce some slightly nicer notation for the mod $p^n$ reduction homomorphism, $\pi_1:\mathbb{Z}\to\mathbb{Z}_{p^n}$: for all $n\in\mathbb{Z}$, let $\overline{n}=\pi_1(n)$. Note that with this notation, $\pi_2(a)=\overline{1}$.
Now for all $(x,y)\in P$,
$$\text{let }k(x,y)=\left(f^{-1}(x-y\cdot a),y\right).$$
Note that $f$ is injective, since our original sequence is exact, but the image of $f$ won't be all of $A$, hence we need to show that $x-y\cdot a$ is in the image of $f$, for all $(x,y)\in P$. Recall that $P=\{(x,y)\in A\times\mathbb{Z}\,|\,\pi_2(x)=\pi_1(y)\}$. Hence if $(x,y)\in P$, then $\pi_2(x)=\overline{y}$. Now note that
$$\pi_2(x-y\cdot a)=\pi_2(x)-y\cdot\pi_2(a)=\pi_2(x)-y\cdot\overline{1}=\pi_2(x)-\overline{y}=0.$$
If follows that $x-y\cdot a$ is in the kernel of $\pi_2$. Hence $x-y\cdot a$ is in the image of $f$. You can check that $h$ and $k$ are inverses, and that $k$ satisfies $p_1=g\circ k$ and $p_2=p\circ k$. It follows that $(P,p_1,p_2)$ and $(\mathbb{Z}_{p^m}\times\mathbb{Z},g,p)$ are both pullbacks.