Humans aren't the only animals that take medication to treat pain, prevent suffering, alter our minds, or just to make ourselves feel better. Caterpillars, parrots, lemurs, dolphins and countless other species, too, take masterful advantage of the chemicals available to them in the wild — in plants, other animals, fungi and the soil itself. Basically, they treat the natural world as though it were a living medicine cabinet.
This type of self-medicating behavior is called "zoopharmacognosy," the subject of a relatively new field of biology formalized in 1987. Yes, the word itself — much like a cat chewing on grass — is a bit of a mouthful, but it comes from Greek roots that translate to "animal," "medicine," and "to know."
The ways that animals use medicine can be categorized according to that medicine's mode of delivery. Is it consumed, like the leaves of Aspilia plants, which are swilled in the mouths of chimpanzees to release the toxins that kill parasitic gut worms? Or is it applied topically, like the formic acid birds use to treat blood-sucking bird lice? (Over 200 species of bird are known to roll over and aggravate ant nests to pester the ants into spraying them with the alleviating acid.) It might be less direct, like the conifer resin that wood ants use to line their nests, which has anti-fungal and antibacterial qualities to keep the colony free from infection.