Nucleophile attack on the carbon containing the leaving group can occur in two different ways. In the first case, the nucleophile can approach the substrate from the side on which the leaving group is located. This approach is called frontal attack, in which the nucleophile takes the place of the leaving group, producing retention in the configuration .

 
stereochemistry-sn2
 
The second possibility involves attack by the nucleophile from the side opposite the leaving group. This type of approach is called a dorsal attack, producing a reversal of the configuration.
 
stereochemistry-sn2-02
 
Hughes and Ingold observed that the hydroxide ion attacked the substrate from the opposite side to the leaving group, producing configuration inversion. The reason that the dorsal attack is more favorable than the frontal one lies in the repulsions between the nucleophile and the leaving group. The face opposite the leaving group is more accessible to the nucleophile.
 
stereochemistry-sn2
 
The S N 2 is a stereospecific reaction, it forms a single stereoisomer, because the nucleophile attack is exclusively dorsal.
 
stereochemistry-sn2
 
The cyanide attack occurs on the opposite side to chlorine (from the bottom) and only the formation of the drawn diastereoisomer is observed.