Alternative formulation of complexity class $BPP$
The subscript to $\Pr$ denotes which random variable the probability is over. In this case the probability is over $r$, which is samples uniformly at random (this is what is conveyed by $\in_R$) from $\{0,1\}^{p(n)}$. You can think of $r$ as representing a sequence of $p(n)$ many random coin tosses.