Tree resin flows, sometimes trapping an insect. More resin wells up, sticking the creature to the tree trunk and covering it completely. Over time the tree dies and decays.