Ionic bonding is a type of chemical bond that occurs when the atom of a metal definitively gives up one or more electrons. One of the atoms must be a metal, and the other a nonmetal or hydrogen.
Covalent bonding is a type of chemical bond that occurs between hydrogen atoms, nonmetals and semimetals, in order to remain stable.
NaCl has an ionic bonding because Na is a metal and Cl is a nonmetal.
H2O has covalent bonding because there is an atom of oxygen (nonmetal) bonded with 2 atoms of hydrogen.
Ca(OH)2 is a base formed by the ionic bond of the hydroxyl anion (OH)- with a metal.
CO2 has covalent bonding because there is an atom of carbon (nonmetal) bonded with 2 atoms of oxygen, which is also a nonmetal.
NH3 has a covalent bonding because there is an atom of nitrogen bonded with 3 atoms of hydrogen.
CuCl has an ionic bonding because there is an atom of copper (metal) bonded to an atom of chlorine (nonmetal)