The Hydra was defeated by Hercules (Heracles) in his second work. Initially Heracles tried to smash the heads, but to each one he cut two appeared in place. He then decided to change his tactics and, so that the heads would not regenerate, he asked his nephew Iolau to burn them with a brand right after the cut, thus healing the wound. He then left only the middle head, considered immortal. Heracles cut and buried the last head with a huge stone. Thus, the monster was killed.
According to tradition, the monster was created by Hera to kill Hercules. When she realized that Heracles was going to kill the snake, Hera sent her the help of a huge crab, but Heracles stepped on it and the animal became the crab (or Cancer) constellation.
Instructed by Athena, Heracles, after killing the Hydra, took the opportunity to bathe his arrows in the monster's blood, to make them poisonous. Euristeu did not consider this work valid (Heracles was supposed to do ten jobs, not twelve), because the hero had help.