Ionic compounds are composed of positively charged ions (cations) and negatively charged ions (anions). When these compounds are dissolved in water, the ions separate and become surrounded by water molecules. The water molecules interact with the ions, forming a hydration layer around each ion. This hydration layer helps to stabilize the ions and prevent them from recombining.
The separated ions in the water are free to move, and they can carry an electric current. The more ions that are present in the water, the better the solution can conduct electricity.
In contrast, covalent compounds, such as sugar (C₁₂H₂₂O₁₁), are poor conductors of electricity when dissolved in water. Covalent compounds are composed of atoms that share electrons, and these electrons are not free to move. When covalent compounds are dissolved in water, the molecules do not dissociate into ions, so there are no free ions to carry an electric current.