Consider an infinite square potential well with potential
$$V(x)=\begin{cases} 0 & \text{if} -a<x<a\\ \infty & \text{otherwise.}\\ \end{cases}$$
The stationary state energies for a quantum particle trapped in such a potential are given by
$$E_n=\frac{n^2\pi^2\hbar^2}{8ma^2},n\in\mathbb{N}$$
where $m$ is the mass of the particle. Now Pauli's exclusion principle states that no two particles having the same quantum state exist in a quantum system.
Suppose an electron trapped in this well and now it is in the quantum state with $n=1$ then its energy (if we set $a=1$) is $E\approx {1.51}\cdot{10^{-38}}\ \mathrm{J}$ .
What would happen if another electron of the same energy as above was trapped in this well? If it was trapped inside the well, then it must violate Pauli's exclusion principle because above electron must have state $n\geq 2$ in this well. And also electron cannot occupy any other positions outside the well because potential is infinite outside the well. So what happend to the electron?