When HCl is added to water, it will dissociate into H+ and Cl- ions because acids are electrolytes. When NaOH is added to water, it will split into Na+ and OH- ions. Bases that are ionic compounds, like NaOH, will also act as electrolytes.
The H+ ion, the acidic hydrogen/proton, will combine with the OH- ion, forming "HOH", more commonly written as H2O.
The leftover ions, the Na+ and the Cl-, combine to form NaCl, an ionic compound/salt.
Most acids will have a standalone H in their formula
Compounds with hydroxide groups ( -OH's) will be bases