Pyridines with leaving groups at positions 2,4 react with nucleophiles, resulting in substitution of the leaving group for the nucleophile. The reaction follows an addition-elimination mechanism.

pyridine nucleophilic substitution 01

Mechanism:

pyridine 02 nucleophilic substitution

Nucleophilic additions are very slow in position 3 given the impossibility of carrying the charge to the heteroatom.

In the case of adding hydroxide ions to the pyridine, the final tautomerism must be taken into account.
pyridine nucleophilic substitution 03