Step 1: Formation of diazonium salt.
Aniline reacts with nitrous acid in the presence of HCl at \(273{-}278\,K\) to form benzenediazonium chloride.
\[
\mathrm{C_6H_5NH_2}
\xrightarrow[\;273{-}278\,K\;]{\mathrm{HNO_2/HCl}}
\boxed{\mathrm{C_6H_5N_2^+Cl^-}}
\]
Thus,
\[
\boxed{X=\text{Benzenediazonium chloride}}
\]
Step 2: Reaction with cuprous chloride.
Benzenediazonium chloride reacts with cuprous chloride to form chlorobenzene.
\[
\mathrm{C_6H_5N_2^+Cl^-}
\xrightarrow{\mathrm{Cu_2Cl_2}}
\mathrm{C_6H_5Cl}
+\mathrm{N_2}
\]
Thus,
\[
\boxed{Y=\text{Chlorobenzene}}
\]
Step 3: Identify the reaction.
Replacement of the diazonium group by halogen using cuprous salts is known as the
\[
\boxed{\text{Sandmeyer reaction}.}
\]
Hence,
\[
\boxed{(D)}
\]
is the correct answer.