In the first case, $p$ is some deterministic value that you chose before (or that is determined by something). For example, you flip a coin, $p=0.5$. Then you have your $n$ trials, each having a probability $p$ of success.
In the second case, $p$ is now a random variable.
**First step** : draw a random number uniformly in $(0,1)$. This number, call it $p$. It may be any number in $(0,1)$ but now you know what it is.
**Second step** : do your trials, each having a probability $p$ of success. The same $p$ that was drawn at random before.
So in the second case there are two levels of randomness.
* The choice of the parameter $p$ is itself random
* The results of the trials are random