Acids and bases react with each other through a neutralization reaction, forming a salt and water. For example, when hydrochloric acid reacts with sodium hydroxide, sodium chloride and water are produced. Acids and bases share similarities in that they both ionize in water, producing ions that allow the solution to conduct electricity. They differ in that acids contain hydrogen ions and bases contain hydroxide ions. When an acid and base react, the hydrogen ions and hydroxide ions combine to form water.