Example 15 (Problem from the 29th Russian Mathematical Olympiad) Find all prime numbers $p$ such that $p^{x}=y^{3}+1$ holds, where $x, y$ are positive integers.
Solve: Since $p^{x}=(y+1)\left(y^{2}-y+1\right), y>0$, then $y+1 \geqslant 2$.
Let $y+1=p^{t}\left(t \in \mathbf{Z}_{+}, 1 \leqslant t \leqslant x\right)$, then $y=p^{t}-1$.
Thus, $y^{2}-y+1=p^{x-t}$.
Substituting $y=p^{t}-1$ we get
$\left(p^{t}-1\right)^{2}-\left(p^{t}-1\right)+1=p^{x-t}$, which is $p^{2 t}-3 p^{t}+3=p^{x-t}$.
Therefore, $p^{x-1}\left(p^{3 t-x}-1\right)=3\left(p^{t}-1\right)$.
(1) When $p=2$, $p^{3 t-x}-1, p^{t}-1$ are odd numbers, then $p^{x-t}$ is odd.
Thus, $x=t, y^{2}-y+1=1$.
Hence, $y=1, p=2, x=1$.
(2) When $p \neq 2$, $p$ is an odd number, then $p^{3 t-x}-1, p^{t}-1$ are even numbers, $p^{x-t}$ is odd.
Thus, $3 \mid p^{x-t}$ or $3 \mid\left(p^{3 t-x}-1\right)$.
When $3 \mid p^{x-t}$, $p=3, x=t+1$, then
$$
y^{2}-y+1=3 \text {. }
$$

Solving gives $y=2, x=2$.
When $3 \mid\left(p^{3 t-x}-1\right)$, we have $p^{x-t} \mid\left(p^{t}-1\right), x=t$.
From (1), we get $y=1, p=2$. Contradiction.
In summary, there are two solutions:
$p=2, x=1, y=1$ and $p=3, x=2, y=2$.