When an ionic compound is dissolved in water, the water molecules surround and separate the ions, forming a solution that can conduct electricity. This is because the ions are free to move and carry an electrical charge. In contrast, in a pure ionic compound, the ions are held tightly together in a crystal lattice and cannot move freely, so the compound does not conduct electricity.
Examples of ionic compounds that do not conduct electricity in their pure form but do conduct electricity when dissolved in water include sodium chloride (NaCl) and potassium iodide (KI).