Covalent bonds are formed when two atoms share electrons. In nucleic acids, the atoms that are covalently bonded are carbon, nitrogen, oxygen, hydrogen, and phosphorus. The covalent bonds in nucleic acids are very strong, which is why nucleic acids are so stable.
Ionic bonds are formed when one atom donates an electron to another atom. In nucleic acids, there are no ionic bonds because all of the atoms share electrons.