Niration of benzene and phenol is an electrophilic substitution reaction. During nitration `overset(+)(N)O_(2)` (nitronium ion) is produced as an intermediate as follows
This nitronium ion (electrophile) attacks on benzene or on phenol. Phenol is more easily nitrated than benzene as the presence of `-OH` group in phenol increases the electron density at ortho and para positions in benzene ring by +R effect.
Since, the electron density is more in phenol than in benzene, therefore, phenol is more easily nitrated than benzene.