In covalent bonding, electrons are shared between atoms
Covalent bonds form between non metallic atoms.
In a water molecule, the hydrogen and oxygen atoms are held together by covalent bonds.
Before bonding, each hydrogen atom requires 1 extra electron to complete its outer shell, and so wants to form 1 covalent bond. Meanwhile, each oxygen atom requires 2 more electrons, and so wants to form 2covalent bonds.
This means that water molecules will be made from 2 hydrogen atoms and 1 oxygen atom, so that all the atoms obtain full outer shells.