For example, when hydrochloric acid (HCl) and sodium hydroxide (NaOH) are combined, water is formed as a product:
$$HCl + NaOH \rightarrow H_2O + NaCl$$
In this case, the hydrogen ion (H+) from the acid combines with the hydroxide ion (OH-) from the base to form water, while the sodium ion (Na+) and chloride ion (Cl-) combine to form sodium chloride (NaCl).
However, when ammonia (NH3) and hydrogen chloride (HCl) are combined, water is not formed as a product. Instead, ammonium chloride (NH4Cl) is formed:
$$NH_3 + HCl \rightarrow NH_4Cl$$
In this case, the hydrogen ion (H+) from the acid combines with the lone pair of electrons on the nitrogen atom of ammonia to form ammonium ion (NH4+), while the chloride ion (Cl-) combines with the ammonium ion to form ammonium chloride.
Therefore, the products of an acid-base reaction depend on the specific acid and base involved, and water may not always be formed as a product.