How does dissolving a salt molecule in water make its atoms ionize?
Electrons in an atom can only take on specific wave states, and only one electron can occupy one wave state at a time. As a result, electrons in an atom take different states, starting from the lowest energy state and going upwards in energy until the electrons have all found distinct states. For various reasons that are not worth mentioning here, electron states in atoms tend to form various groups, with the states in the same group having very similar energies and states. Chemists call these groups of electron states "shells", even though they have nothing to do with literal shells.