Phenol exists as a resonance hybrid of the following structures.
Thus, due to resonance the oxygen atom of the -OH group acquires a positive charge and hence attracts electron pair of the
O−H bond leading to the release of hydrogen atom as proton.
Once the phenoxide ion is formed it stabilises itself by resonance which is more stable than the parent phenol as there is no charge separation.
Effect of substituent : Presence of electron withdrawing groups
(−NO2,−X,−CN) increase the acidity of phenols while the presence of electron releasing groups
(−NH2,−CH3) decrease the acidity of phenols. This explains the following order of acidity :
p -nitrophenol > phenol > p -cresol.