Ionic Bond: Ionic bond is a type of electrostatic force of attraction which is acting between electropositive and electronegative atoms. Such types of bonds form during the complete transfer of electrons of one atom to the other atom.
Example of ionic bond: In the electron of sodium is transferred to the chlorine so an ionic bond is formed.
Covalent Bond: The sharing of electrons between the two atoms is the reason for covalent bonding.
Example of covalent bond: In the electron of hydrogen and carbon is being shared to form a covalent bond.
Water: We can understand the bonding in water molecules by the seeing the structure of water molecules-
Hydrogen and oxygen share one electron each to form a covalent bond. As they share the electron so they both can complete their octet.
Here the complete transfer of electrons is not taking place. The electron cloud is a little bit shifted towards the oxygen atom because of the electronegativity of oxygen.
Due to the shifting of electron cloud towards the oxygen the water becomes polar. Due to sharing of electrons the water has a covalent bond.