They aren't REAL worms. That's just a metaphor. Read this.. Taken from rcg.org.
What is the meaning of “worms that die not,” in Mark 9:44-48?
These verses may seem to indicate that Jesus was calling sinners “worms” and that they do not die but rather live in an everlasting fiery torment. Indeed, some believe this. Others believe that it refers to some kind of “immortal worms.” One of the key things they fail to recognize however is that Jesus said, “their worms.”
He was actually referring to the primary method of garbage disposal of that time. The word “worm” may be better translated from the original Greek word skolex as “grub” or “maggot.” In verse 47, He refers to “hell,” which the margins in some Bibles indicate should be better translated as “Gehenna.” This was also called the Valley of Hinnom and was an area located outside the city of Jerusalem, where trash, animal carcasses, and even carcasses of criminals were incinerated by fire. Of course, maggots devoured anything not destroyed by the heat.
The point was that for anything thrown into that valley, complete destruction was inevitable. Similarly, there can be no escaping the result of unrepentant sin—death in the “lake of fire” (Rev. 20:14-15). A similar scenario is discussed in Isaiah 66:24, and again the meaning is not that the unrepentant sinner or “worms” live forever. The maggots live only as long as there is “food.” The fire burns only as long as there is fuel. Again, the point is that sin not repented of has dire consequences—complete and permanent death!