The rate of electrophilic substitution reaction depends upon the energy of activation i.e. difference in energy of of ground state and transition state of the reactant. So the rate of reaction depends on the electrons which are availability in the benzene ring. If the ring is electron rich (-ve), the electrophilic attack is faster. If the ring is electron deficient (+ve) The attack is slower. So the substituents which are electron donating, this are activate the aromatic ring while an electron withdrawing substituent will deactivate it.
Ortho-para directing groups (direct the incoming group to the ortho and para positions -OH, NH2, CH3, OR -R) release electrons into the ring, makes it electron rich and hence activates the Benzene ring to electrophilic attack.
meta directing groups which are direct the incoming group to meta position (NO2, SO3H, COOH) withdraw electrons from the ring and makes it electron deficient and Hence deactivates the benzene ring two electrophilic attack.
Anomalous Behaviour of Halogens: A halogen substituent is electron releasing by resonance but it’s high electronegativity (inductive effect) so it also act as electron withdrawing. This inductive effect is more than the resonance effect so the final net result is electron withdrawing which make the ring electron deficient and make deactivates the benzene ring towards electrophilic substitution.