Classification of a bond as polar, nonpolar or ionic depends on its electronegativity difference. The electronegativity difference is obtained by calculating the difference between the electronegativity values of the atoms present.
A nonpolar covalent bond occurs whenever two nonmetals with the same electronegativity bond. This results in equal sharing of the bonding electron pair. Molecules such as chlorine, hydrogen and fluorine have this type of bond.
A polar covalent bond occurs whenever two nonmetals with different electronegativities bond. This leads to unequal sharing of electrons in the bond. Examples of polar-bonded molecules are hydrochloric acid and water.
An ionic bond occurs whenever there is a complete transfer of electrons in the bond. Examples of substances with this type of bond are sodium chloride and magnesium chloride.