Electrons orbit the nucleus (like planets orbit the sun) in what are referred to as energy levels or shells. However, unlike the planets’ orbits, the shells also contain subshells and the subshells consist of orbitals. Electrons enter the available orbitals in order of increasing energy, and increasing distance from the nucleus. Ordinarily an energy level or shell is filled to capacity before the next one starts to fill. The first energy level can hold a maximum of two electrons. Below is a chart of the first four energy levels showing the maximum number of electrons allowed in that level or shell. These numbers are obtained from the formula 2n2 where n represents the energy level 1,2,3 etc.

Total number of electrons in level

So if we examine the electron configuration of Neon, which has atomic number 10 (so therefore 10 electrons) there would be two electrons in the first energy level, and then the remaining eight would be placed in the second energy level. See the diagram below (colour added for emphasis on energy levels). Note that for lightweight atoms, there will not be enough electrons to completely fill the third level but for heavier atoms this will occur. For example, calcium with atomic number 20 will have this configuration in the first 4 energy levels: 2, 8, 8, 2 electrons. But for bromine, with atomic number 35, there are enough electrons to completely fill the 3rd shell. The electron configuration is: 2, 8, 18, 7 electrons.