Trees respond to wounding or injury in two ways: compartmentalization and the development of barrier zones (Shigo 1986).
Compartmentalization
When a tree is wounded, the injured tissue is not repaired and does not heal. Trees do not heal; they seal. If you look at an old wound, you will notice that it does not “heal” from the inside out, but eventually the tree covers the opening by forming specialized “callus” tissue around the edges of the wound. After wounding, new wood growing around the wound forms a protective boundary preventing the infection or decay from spreading into the new tissue. Thus, the tree responds to the injury by “compartmentalizing” or isolating the older, injured tissue with the gradual growth of new, healthy tissue.
Barrier Zones
Not only do trees try to close the damaged tissue from the outside, they also make the existing wood surrounding the wound unsuitable for spread of decay organisms. Although these processes are not well understood, the tree tries to avoid further injury by setting chemical and physical boundaries around the infected cells, reacting to the pathogen and confining the damage.
Source
Research on how trees heal wounds