Terraria item ID 2002. Terraria 1.4.5.7.
The Worm is a critter that spawns in the Underground layer at any time, or on the surface while it is raining. It also has a chance to spawn when grass plants or certain ambient dirt or stone piles are destroyed, jumping out of the destroyed object. Worms are always replaced by Maggots(Desktop, Console and Mobile versions) in Graveyard biomes. The Worm has only 5 health and no defense, and can be damaged by other enemies and players. The Worm can be caught with any Bug Net to be carried around in the inventory and released later, or crafted into animated decorative furniture (Worm Cage).
Description from the Terraria Wiki.