The mahko root was a plant native to the planet Neural. It was the only known cure for the poisonous bite of the deadly Mugato, and then only when properly administered by a female shaman of Neural's Hill People known as the Kahn-ut-tu. The treatment was highly ritualized.
The ritual involved the beating of drums and chanting of certain incantations as the shaman created a wound in her own hand, took hold of the mahko root against the wound, then pressed it against the victim's wound. The root then seemed to move of its own power as it drew the toxin out. It may have acted as a filter between the two circulatory systems to help screen out the poison. It is unknown if the ritual itself has anything to do with the healing processes, but the root certainly has an effect of cleansing the body.
Incidentally, the ritual also acted as a pseudo-marriage ceremony between the victim and the administering Kahn-ut-tu shaman, as the victim owed the shaman his or her life thereafter. (TOS: "A Private Little War")