The two elements that make up a molecule of water are hydrogen and oxygen; there are two hydrogen atoms and one oxygen atom, resulting in the chemical formula H2O. Hydrogen and oxygen bond together due to the number of electrons in their orbitals.
An oxygen atom has six electrons in its second shell, and a hydrogen atom has one electron in its first shell. A second shell is considered to be full at eight electrons, while a first shell is full at two electrons.
The oxygen atom bonds to the two hydrogen atoms through the use of covalent bonds, which allow the atoms to share their electrons. The oxygen atom has a full second shell, and the two hydrogen atoms have full first shells.