Only two electrons, with opposing spins, are allowed in each orbital is known as the Aufbau's principle.
Explanation:
Aufbau's principle states that at the ground state of atom the atomic orbits of lowest energy are first filled by the electrons followed by the atomic orbits of higher energy.
Example:
1s orbit is first filled by the electrons in the opposite spin followed by 2s. Thus, first 1s is filled with 2 electrons in the opposite spin before filling the 2s orbit.