Ionic compounds have high melting and boiling points because they have a giant structure with strong electrostatic forces between oppositely charged ions that require a lot of energy to break.

 

Giant 3D lattice of sodium chloride (NaCl)