Under certain conditions sodium chloride, commonly known as salt, can conduct electricity. When solid NaCI cannot conduct electricity, it is because the positive and negative ions are locked in place and unable to move freely.
When melted or dissolved in water, however, the crystal lattice breaks down and allows the charged particles to move freely. This, in turn, allows the conduction of electricity. In order for any substance to be an electrical conductor particles must be charged, and those particles must be free to move to either the cathode or anode. As sodium chloride contains charged particles, only the state of the chemical matters when considering its ability to conduct electricity.