How do plants use chemical defenses?
there are few chemicals which plants uses to mount a defense response, examples include phenolic groups, terpenoids and alkaloids.
Plants are more complex than they look. Plants produce secondary metabolites like phenolic groups, terpenoids and alkaloids which help plants to mount a constitutive defense response against the invading pathogen which even include herbivores.
One example for chemicals being a part of defense response will be phenolic group compounds. these compounds when produced have the capability to disrupt the normal functioning of pathogen cell, but is mostly pathogen specific.
Examples of phenolics include medicarpin by alfalfa , rishitin by both tomatoes and potatoes , and camalexin by Arabidopsis thaliana.
if you need a better understanding of plant defense responses check this article out.