A covalent bond is formed between two non-metals that have similar electronegativities. Neither atom is "strong" enough to attract electrons from the other. For stabilization, they share their electrons from outer molecular orbit with others
Nonpolar covalent bonds form when the electronegativity values are very similar, while polar covalent bonds form when the electronegativity values are a little further apart. If the electronegativity values of two atoms are different, ionic bonds are formed.