1)Many plants have impenetrable barriers, such as bark and waxy cuticles, or adaptations, such as thorns and spines, to protect them from herbivores.
2)If herbivores breach a plant's barriers, the plant can respond with secondary metabolites, which are often toxic compounds, such as glycol cyanide, that may harm the herbivore.
3)When attacked by a predator, damaged plant tissue releases jasmonate hormones that promote the release of volatile compounds, attracting parasitoids, which use, and eventually kill, the predators as host insects.
i hope this helps:)