Internally, plants are equipped with immune systems to defend against pathogens, and many produce chemicals to ward off attacks from potential predators, such as beetles, worms and other insects. Some plants also have spiky thistles and needles along their stems and branches to make them unappealing (and inedible) to prey, while others sprout colorful blossoms that are certainly pleasing to the eye, but more importantly, warn predators that plants have venom or toxic chemicals within.
Like humans, plants have immune systems that protect them against attack from pathogens. Just as hormones and chemicals defend people against viruses, bacteria and other diseases, the immune systems of plants contain chemicals and nutrients that fight off attacks from diseases and parasites. Many plants produce the chemicals that they need to build their defense systems during the earliest stages of life, while others begin producing those agents following encounters with foreign pathogens.
In addition to their active immune systems, plants secrete special chemicals, which are often scentless and invisible to the human eye but can be seen and smelled from afar by birds, insects and bugs. Some plants, instead of keeping predators at bay, produce sweet and syrupy substances that attract aphids, worms and other organisms; these syrups are consumed by those organisms and contain toxins that ultimately kill them.