Example 1 Let $p$ be a prime number, and $m, n$ be non-negative integers. Find all triples $(p, m, n)$ that satisfy $p^{m}-n^{3}=8$.
Solve: From $p^{m}-n^{3}=8$, we know
$$
p^{m}=(n+2)\left(n^{2}-2 n+4\right) \text {. }
$$

Since $p$ is a prime, without loss of generality, assume
$$
p^{x}=n+2, p^{y}=n^{2}-2 n+4 \text {, }
$$

where $x, y \in \mathbf{Z}_{+}, x+y=m$.
For any non-negative integer $n$, we have
$$
\begin{array}{l}
n^{2}-2 n+4-(n+2)=n^{2}-3 n+2 \\
=(n-1)(n-2) \geqslant 0 .
\end{array}
$$

Thus, $x \leqslant y$.
Therefore, $p^{x} \mid p^{y}$, i.e., $(n+2) \mid\left(n^{2}-2 n+4\right)$.
Since $n^{2}-2 n+4=(n+2)^{2}-6(n+2)+12$, it follows that $(n+2) \mid 12$.

Hence, $n+2 \in\{2,3,4,6,12\}$, i.e.,
$$
n \in\{0,1,2,4,10\} \text {. }
$$

When $n=0$, $p=2, m=3$;
When $n=1$, $p=3, m=2$;
When $n=2$, $p=2, m=4$;
When $n=4$, $p^{m}=72=2^{3} \times 3^{2}$, which is impossible;
When $n=10$, $p^{m}=1008=2^{4} \times 3^{2} \times 7$, which is impossible.
In summary, the triples that satisfy the conditions are
$$
(p, m, n)=(2,3,0),(3,2,1),(2,4,2) \text {. }
$$