Nucleophiles attack at that part of the substrate molecule which is electron deficient. The reaction in which a nucleophile replaces an already existing nucleophile in a molecule is called a nucleophilic substitution reaction. Haloalkanes are substrates in these reactions. In this type of reaction, a nucleophile reacts with a haloalkane (the substrate) having a partial positive charge on the carbon atom bonded to halogen. A substitution reaction takes place, and the halogen atom, called the leaving group, departs as a halide ion. Since the substitution reaction is initiated by a nucleophile, it is called a nucleophilic substitution reaction.
\(Nu^− +C-X →C-Nu+X^−\)