system
Given the following post, respond as if you're commenting on Reddit:
human
Do plants have immune systems?

Whether it's bacteria, fungus, or insects, do plants have a way to fight off deadly organisms? Obviously trees and other plants don't have white blood cells or immune systems like animals, so I was wondering if they had a way to fight off diseases and parasites.
gpt
In woody plants, there are four "walls" of defense from infection.  

The first is the closing up of vessels in a wound or around a site infected with a fungus/virus/what-have-you.  This inhibits the movement of pathogens/decay up and down in the stem of the plant.

The second is the hard rings of early and late wood which inhibit spread of infection or decay tangentially, or in and out of the plant.

The third is the ray cells which compartmentalize a wound or infection radially.

The fourth and most effective wall is the layer of hardened wood that will grow around the outside of the infection/wound that will block it off from the outside (like a scab).

In effect these four walls compartmentalize an infection or wound so that it can't harm the rest of the plant.

Another big part of herbivory prevention is secondary metabolites.  These are chemicals or structures a plant makes to create defenses.   There are flat-out poisons like caffeine, cocaine, nicotine, stricnine, terpentine, etc. that will adeversely affect anything that consumes the plant.  There are also things like wood, thorns, tannins, waxes, and aromatic oils that will make plant tissues indigestible to infection or insects, armor it, or just repel herbivores.