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.
Below is a table showing the maximum number of electrons an element can have for each of its electron shells. The information shown is for elements with atomic numbers 1 to 20:
This electronic structure can be written as 2.8.1 (each dot separates one shell from the next). This electronic structure can also be shown as a diagram. In these diagrams: