Inside the atom, by Coulomb's law

An atom is a small positive nucleus of protons and neutrons with electrons around it in shells and subshells; Coulomb's law, stronger for bigger charges and closer distances, says how tightly each electron is held.

From AP Chemistry.