Defining a stereospecific reaction
A stereospecific reaction is one in which there is only one possible stereochemical outcome for the product and that outcome is controlled by the stereochemistry of the reactant. 

One of the earliest examples studied by most students of organic chemistry is nucleophilic substitution by the $\mathrm{S_N 2}$ mechanism. This reaction in its simplest form has a concerted mechanism. Reactions with concerted mechanisms often have stereospecific outcomes because the concerted mechanism demands a certain geometric arrangement of the reactants. In the case of the $\mathrm{S_N 2}$ mechanism, the nucleophile must approach from the opposite side of the molecule from the leaving group for steric and electronic reasons.



Likewise, the $\mathrm{E2}$ elimination mechanism leads to a stereospecific outcome. Stereospecificity does not require a one-to-one mapping of stereochemical inputs to outcomes. Rather, it requires a predictable mapping of inputs to outcomes. 

For example, consider the $\mathrm{E2}$ elimination of 2-chloro-3-methylpentane with hydroxide. The reactant has four possible stereoisomers and the major Zaitsev product has two possible stereoisomers. Each stereoisomer leads to only one possible stereoisomeric product even though each stereoisomer of the product can be prepared from two stereoisomers of the reactant.