When atoms form a covalent bond, they do not always share their electrons equally. This is because atoms differ in their electronegativity, or their ability to attract electrons. Consider what happens between atoms of chlorine and sodium.
Chlorine has a higher electronegativity than sodium. As a result, it strips an electron from the outer shell of the sodium atom. The sodium readily surrenders the electron to chlorine because it has lower electronegativity.
A more important example of the importance of electronegativity occurs within a molecule of water. Water is composed of two atoms of hydrogen and one of oxygen. Of these two elements, oxygen has the greater electronegativity.
Because of this, the electrons that are shared in the covalent bond between the oxygen and hydrogen atoms are attracted more towards the oxygen atom and thus spend, on average, more time orbiting the oxygen atom than the hydrogen atom. Since electrons have a negative charge and spend most of their time near the oxygen atom, the oxygen atom itself takes on a slightly negative charge, and the hydrogen atom becomes slightly positive. This causes the bond between the oxygen and hydrogen to become polar. The term polar simply means that the atoms on either side of the bond have a partial and opposite charge. Now let's put this water molecule in an environment with other water molecules.
Notice that the water molecules orient themselves so that the negative end of one water molecule is opposite the positive end of another water molecule. When water molecules orient themselves in this manner, a weak attractive force, called a hydrogen bond, is formed. In water, hydrogen bonds are abundant.
Each water molecule can engage in as many as four hydrogen bonds. However, hydrogen bonds are weaker than covalent bonds, and therefore tend to be be temporary, breaking and reforming constantly. In water, the large number of hydrogen bonds and their temporary nature is what gives water its unique characteristics and makes it the basis for life on Earth.