This is a hierarchical model defined by the conditional distribution of the $X_i$'s given $P$ and the marginal distribution of $P$, represented by its density $p$, as $\Pi=\Pi(p)$.
In a finite setting when the $X_i$'s take values in a finite set $\mathfrak X$, for instance $\{1,\ldots,k\}$, $p$ is the probability mass function (pmf) represented by $(\rho_1,\ldots,\rho_k)$ where
$$\sum_{j=1}^k \rho_j=1$$
and $X_i\sim p$ means that
$$P(X_i=j)=\rho_j$$
Then, $p\sim \Pi$ signifies that the vector $(\rho_1,\ldots,\rho_k)$ is distributed as $\Pi$, which is a distribution on the $k$-dimensional simplex, for instance a Dirichlet distribution. The marginal distribution of the $n$-sample is then
$$\int \prod_{i=1}^n \rho_{x_i} \,\text d\Pi(\rho_1,\ldots,\rho_k)$$
and the $X_i$'s are no longer independent (but exchangeable).
In a continuous setting when the $X_i$'s take values in a continuous space like $\mathbb R^k$ and $p$ is, e.g., a density wrt the Lebesgue measure on that space, with no further constraint, the distribution on $p$ is then a probability distribution $\Pi$ over the set $\cal P$ of probability measures, i.e., a a family of stochastic processes whose realizations are probability distributions. An example of such distributions are the Dirichlet processes often found in Bayesian non-parametrics.
Still within a continuous setting, if instead the family $\cal P$ of probability densities is chosen to be parameterised, for instance (when $\mathfrak X=\mathbb R$) the set of all Normal densities,
$$\mathcal P=\{\text{N}(\mu,\sigma);\ \mu\in\mathbb R\,,\ \sigma\in\mathbb R^+\}$$
$\Pi$ is (the image of) a probability distribution over $\mathbb R\times\mathbb R^+$.
The marginal distribution of the $n$-sample is then
$$\int \frac{1}{(2\pi\sigma^2)^{n/2}}\exp\big\{-\sum_{i=1}^n
(x_i-\mu)^2/2\big\}\,\text{d}\Pi(\mu,\sigma)$$
and the $X_i$'s are no longer independent (but exchangeable).