You're getting what probably comes across as a lot of mumbo-jumbo about quantum numbers and "stability", language which chemists use to describe what's going on, but none of which answers your fundamental question of "why?" ("Closed electron shells have the highest stability" is an observation, not an explanation.)
For starters, you should be familiar with the notion of "lowering the energy" as a driving force for physical change. Balls roll downhill, exothermic reactions proceed in the forward direction, ink diffuses throughout a solution. By "energy" we mean the Gibbs free energy "G" of the system, which changes according to the equation ΔG = ΔH - TΔS. (You may want to review the part of your p-chem or thermodynamics textbook that covers this ... having a solid understanding of it is essential to making sense of physical and chemical processes.)
Electrons in an atom can only occupy specific orbitals, having specific energies - i.e., the energy levels are quantized. This is nicely described by the Schroedinger equation, a type of equation that produces only specific numbers ("eigenvalues", to a mathematician) for the energy of the system, which depend on the integer values of a set of quantum numbers. (We give names to the quantum numbers to help us think about and visualize them, but nobody knows what "spin" or "angular momentum" actually are to a subatomic particle/wave.) If you do the math, you find that the nth electron shell (n being the "principal quantum number") has solutions only for 2n² electrons - which is where we get 2, 8 and 18. (We also get 32 and 50, but things get complicated.) Very broadly speaking, the calculated energy jumps considerably with each increase in the value of n. An electron added to a neon atom would have to go into the third shell; it will have lower energy if it goes anywhere else, so that's exactly what it does, leaving neon neutral and inert. Bump one of neon's inner electrons up to the third shell with a high voltage jolt, and it will drop back down immediately, releasing energy in the form of light (and you've just made yourself a neon lamp.)
The lone electron present in sodium's third shell is in a very similar situation, but is weakly held in place by the higher charge on the nucleus. If you give it a lower-energy option (say, by throwing the sodium into water), it will happily depart to leave behind a sodium ion, Na+. And so it goes: atoms give and take electrons until energy is minimized, and that usually happens when a shell is full.