Sodium chloride has an ionic bonding and it has a crystal structure also called lattice structure. Thanks to the strong forces between sodium and chlorine atom, we need to give more energy to seperate the positive and negative ions in a crystal lattice. This is the reason why sodium chloride has high melting and boiling point.
In the water the ions of the ionic compound can be seperated and dissolve easily.
Sodium chloride doesn’t conduct electricity when it has a solid state but it conducts electricity when it dissolves in water. Because the ions in the solid NaOH are so tight that they can not conduct electricity but when they dissolve in water the salt molecules become ions which can move and conduct electricity.