Atoms are smallest units of matter, most of these atoms other than atoms of noble or inert gases are less stable which means they great show tendency to combine with atoms of same or different element in order to achieve stability. Atoms of noble gases like Krypton, Helium, Argon, Neon, Radon and Xenon are non reactive which means their atoms do not combine to form a molecule because these atoms have stable electronic configurations.
What do we mean by a stable atom?
When net electrical charge of an atom is 0 in other words when number of protons is equal to the number of electrons and in a similar manner it has a stable nucleus having same number of protons and neutrons, these types of atoms are known to be stable atoms. These atoms are not inert, they can still form chemical compounds by sharing their atoms.
All of the atoms except Helium have around 8 electrons in it’s outer most shell. if two electrons are present in outermost shell it known as duplet configuration and when these numbers are eight it is known as octet configuration.
In above figure you can see, sodium has only one electron in it’s outer most shell and chlorine has 7 electrons in its outer shell. That lone sodium electron can be transferred to chlorine atom and this way both atom will have full outer shell and they will achieve stability.
so we can say that electrons that do not have duplet or octate configuration try to loose, gain or share electrons and in this process they form molecules in order to achieve stability.
What is an ion ?
A charged atom or molecule is called ion. It is charged because number of electrons is not equal to the number of protons in a atom or molecule. An atom becomes an ion when it looses or gains an electron. When an atom gains electron it is called cation and when an atom looses electron it’s called anion.