Schrödinger's Equation can be used to find the electron distributions in a range of situations. The easiest to solve, theoretically, is the potential well. This is a region of space with a lower potential than neigbouring regions. The simplest case is where the well is infinitely deep, so electrons cannot ever escape. This is the **Infinite Potential Well**:

If you add more electrons to the box, the states are filled according to the Aufbau Principle:

However, infinte wells don't exist and are just a convenient approximation. In real life, we deal with **Finite Wells**: