Sodium chloride is a colourless/white crystalline solid.

The Na+ and Cl- ions are held together by electrostatic forces in a crystal lattice.

Because the electrostatic forces are independent of direction, when the solid is heated it is transformed into a liquid. The liquid state retains the electrostatic forces and so the liquid exists over a wide range of temperatures.

Note how each sodium ion is surrounded by six chloride ions, and vice-versa. (The coordination number is six.)