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.
Mechanical defenses work by discouraging herbivores, or plant-eaters, from consuming the plant in the first place, by harming the herbivores that do take a bite, and/or by slowing down the herbivores so that they consume less of the plant than they would otherwise. Examples of mechanical defenses include thorns on the leaf or stem, bark on a tree, and trichomes or barbs on the leaf. In some instances, a plant will protect its seeds with a tough shell (think of a coconut, a jackfruit or a pineapple). Some plants have waxy cuticles on their leaves that protect against microorganisms and insects. All of these mechanical defenses prevent and discourage others from feeding on the plant.
Some plants can use insects to protect itself. This strategy works very well. When is been attacked by a herbivore, some plants attract insects given to them something they like (nectar or something like that) to kick out the animal. It is a relation of mutualism (if you give me something - food, for exemple - I will protect you)
Plants produce different Chemicals which help them in defending themselves from Herbivores.
Some of the examples of chemical defenses are: Production of Latex (Calotropis gigantia), Production of Alkaloids like Nicotine, Caffine, Morphine, Cocaine etc. These alkaloids will have Pharmacological affects on Humans and Animals when they consume them.