H2O, more commonly known as water, is a covalent compound. This type of compound is the result of atoms, usually from nonmetal elements, sharing electrons. Water has a special type of covalent bond called a polar covalent bond.
Within covalent bonds, electrons' orbits encompass each of the atoms in the compound. In polar covalent compounds, the electrons are similarly shared among the atoms in the compound, but the electrons spend more time orbiting the atom that has the greater affinity for electrons. Only atoms that have exactly the same electron affinity can share electrons equally in this type of compound. In water, oxygen has a greater electron affinity than hydrogen; therefore, the electrons spend more time around the oxygen atom than the hydrogen atoms.