Pine trees emit a toxin designed to kill pests. If it does not succeed, the toxin is emitted through all holes punctured into the leaves. If enough toxin is detected, more trees release it, this creates that distinct pine smell. The toxin also alerts special ladybugs, and they are guided to the source, getting a good meal and saving the tree.