Resonance is an important factor in phenols. During resonance -OH group in phenol gives its electrons to the benzene ring. As a result of this, the electron density on benzene ring is very high. This increased electron density repels nucleophiles.
Therefore, nucleophiles cannot attack the benzene ring and phenols usually do not give nucleophilic substitution reaction.