2Na(s) + 2HCl(aq) → 2NaCl(aq) + H2(g)
In this reaction, sodium atoms lose one valence electron each to become positively charged sodium ions (Na+). These ions combine with negatively charged chloride ions (Cl-) from hydrochloric acid to form sodium chloride, which is a soluble ionic compound. Hydrogen atoms from hydrochloric acid gain one valence electron each to become neutral hydrogen molecules (H2), which are released as a gas.
The reaction between hydrochloric acid and sodium is a classic example of a single-displacement reaction, where one element (sodium) replaces another element (hydrogen) in a compound (hydrochloric acid).