An atom is supposed to contain shells for electrons. The shells are energy states for the electrons. The shells are called K, L, M, N etc. They correspond to principal quantum number n=1,2,3,4,5 etc.
The maximum number of electrons in each shell is equal to 2 n².
The energy of electrons is associated with this value of n - quantum number. The difference of energy between two successive shells is high.
The atoms which have the maximum number of electrons in its outermost shells, are supposed to be stable. As, the attractive forces of nucleus on electrons is stable. Then those atoms do not attract electrons from another nearby atoms. Hence they do not react chemically with other atoms of the same matter or other substance.
Noble gases have 2n² number of electrons in their outermost shell. Hence they are stable. They remain as atoms.
Other elements, want to give up electrons to reduce to having outermost electrons being full in their lower quantum number shell. Or, they want to get more electrons to make their orbitals & shell complete to 2n² capacity. Hence they are reactive. That is why they form molecules and compounds. So they are called unstable.