The reaction in which hydrochloric acid (HCl) reacts with sodium hydroxide (NaOH) to produce water (H2O) and sodium chloride (NaCl) is a special type of double displacement reaction called a neutralization reaction. In a double displacement reaction, the anions of the reactants switch the cations they are associated with.
The reactant HCl forms a cation, H+, and an anion, Cl-, in an aqueous solution. Sodium hydroxide forms a cation, Na+, that is associated with OH- on the reactant side. When the reaction proceeds to the product side, Na+ switches the anion it is associated with from OH- to Cl-, thus yielding NaCl. Similarly, H+ switches its anion from Cl- to OH- to form water (H2O). Since both the anions are being displaced from their original cations, this reaction is called a double displacement reaction.
This special kind of double displacement reaction is called a neutralization reaction because HCl is an acid and NaOH is a base, and they neutralize each other to form water and a salt after the reaction.