Step 1: Diazotization: Aniline is treated with Sodium Nitrite (NaNO$_2$) and Hydrochloric acid (HCl) at a low temperature (0-5$^\circ$C) to form Benzene Diazonium Chloride.
C$_6$H$_5$NH$_2$ + NaNO$_2$ + 2HCl $\xrightarrow{0-5^\circ\text{C}}$ C$_6$H$_5$N$_2^+$Cl$^-$ + NaCl + 2H$_2$O
Step 2: Sandmeyer Reaction: The Benzene Diazonium Chloride is treated with Cuprous Chloride (Cu$_2$Cl$_2$ or CuCl) in HCl.
C$_6$H$_5$N$_2^+$Cl$^-$ $\xrightarrow{\text{CuCl/HCl}}$ C$_6$H$_5$Cl + N$_2$
The product C$_6$H$_5$Cl is Chlorobenzene.