It seems self-explanatory. If it doesn't strike you that way, let's try this:
You wrote $p_n=e^{-p_{n-1}^2}$.
The index $n$ can be $0,1,2,3,4,5,\ldots$.
You said $p_0=0$.
So we have
\begin{align}
p_1 & = e^{-p_0^2} & (\text{In this case, $n=1$ and so $n-1=0$.}) \\[8pt]
p_2 & = e^{-p_1^2} & (\text{In this case, $n=2$ and so $n-1=1$.}) \\[8pt]
p_3 & = e^{-p_2^2} & (\text{In this case, $n=3$ and so $n-1=2$.}) \\[8pt]
& \text{and so on.}
\end{align}
You know $p_0$. In the first line above, you find $p_1$. It's a number. You use it in the second line, and thus you find $p_2$. That's another number. Then you use that in the third line to find $p_3$. And so on.
You might also note that $p_{2n}<p_{2n+2}<p_{2n-1}<p_{2n+1}$. In words, the terms jump back and forth over the solution. As a result, your error after $n$ iterates is less than $|p_n-p_{n+1}|$. This allows you to determine when to stop or (actually, I presume) when your program should stop.