An ionic compound is a giant lattice of oppositely charged ions held together by strong electrostatic forces. To melt or boil the compound, these forces between the ions must be overcome. This needs a lot of energy, so ionic compounds have high melting points and boiling points. Sodium chloride, for example, melts at 801 °C.
A substance can only conduct electricity if it contains charged particles that are free to move. In a solid ionic compound the ions are held in fixed positions in the lattice. They can vibrate but cannot move around, so the solid does not conduct.
When the compound is molten, the lattice has broken down and the ions are free to move. When it dissolves in water to make an aqueous solution, the ions separate and are also free. In both cases the moving ions carry the charge, so the liquid conducts electricity.