plants have a number of responses to insects and other animals that eat them (herbivory), including changing metabolism to cope with physiological stress or producing toxins that make plants more resistant.
the herbivores may develop strategies to counter the plant's defenses and influence its signaling pathways, creating a kind of arms race where herbivores and plants co-evolve.