Polarity and covalent bonds
Polarity occurs in a molecule when two atoms share electrons unequally along a covalent bond.
Certain elements have a stronger tendency to attract electrons. When atoms of such elements bond with atoms with a weaker tendency to attract electrons, unequal sharing of electrons results.
The electrons will be closer to the atom with the stronger tendency to attract.
This results in a small, relatively negative charge on the atom with stronger attraction to the electrons, and a small relatively positive charge on the other atom.
Atoms of fluorine, oxygen, nitrogen, and chlorine exert stronger pulls, resulting in negative charges around them and positive charges elsewhere in the molecule.
Molecules containing any of these four atoms are thus usually polar.