(N/A) Any chemical reaction is the result of competition between different reaction pathways. When an alkyl halide reacts with a base or a nucleophile,two competitive pathways are possible:
$(A)$ Elimination reaction
$(B)$ Substitution $(S_N1$ and $S_N2)$ reaction
The pathway followed depends on three factors: $(i)$ The nature of the alkyl halide,$(ii)$ The strength or size of the base/nucleophile,and $(iii)$ The reaction conditions.
$\Rightarrow$ Primary halides prefer the $S_N2$ pathway.
$\Rightarrow$ Secondary halides prefer $S_N2$ or elimination depending on the strength of the base/nucleophile,often abstracting an $H$-atom instead of attacking the carbon atom due to steric hindrance.
$\Rightarrow$ Tertiary halides undergo $S_N1$ or elimination based on carbocation stability or the formation of a more substituted alkene,respectively. For example,with $CH_3CHBrCH_3$.