In the molten state, sodium chloride is heated to a red heat at 801o C it melts to a liquid. This has ions like sodium and chloride ions which are mobile and have an attraction for water molecules causing their bonds to break and form ions to conduct electricity while solid salts are ionic and stable compounds, it is an insulator.