The cooling is caused by an endothermic chemical reaction that absorbs heat. One website identifies the compounds as a combination of ammonium chloride, urea and buffering agents to create the chemical reaction. There may be various other compounds used in other products. I'm not sure if the water will actually freeze, but it will get cold. The salt solution is probably not ordinary salt, but other salts like ammonium chloride or ammonium nitrate.
making a small donation to science.ca.