The short answer is: pure water does not conduct electricity. Any impurities, like salts, in the water enabled it to conduct electricity. When salts are dissolved in water, they separate into different electrically charged atoms called ions.
Salt, or sodium chloride (NaCI), breaks up into positive Na ions and negative CI ions. If you place a battery with a negative pole and a positive pole into water, the negative ions will be attracted to the positive pole and the positive ions will be attracted to the negative pole thus creating a closed circuit.