No more than one electron can be in one spin state (therefore $1e^- $ ou $0 e^-$). So no more than $2e^-$ electrons can be in one orbital, In a subshell $s$ there are no more than $2e^-$, In a subshell $p$ there are no more than $6e^-$, In a subshell $d$ there are no more than $10e^-$, In a subshell $f$ there are no more than $14e^-$
All spin states of one subshell have the same energy.
Energies of subshells increase from bottom to top on the basis of the following diagram:
The order of filling the electrons is by increasing energy, therefore by following the arrows in the diagram:
Example (Electrons are represented by arrows):
If there is a choice between orbitals of the same energy, electrons occupy the maximum possible of them.
Example :