Different shells can hold different maximum numbers of electrons. Electrons occupy shells starting with the innermost one. They begin to occupy the next shell when a shell becomes full.
Want to learn more about this centerpiece of chemistry? Take your pick from this collection of links about elements and the periodic table! Build an element ball, solve periodic puzzles, and check out ...