A worm is a device used to remove unspent powder bag remnants from a cannon or other piece of muzzle loading field artillery. It usually took the form of a double corkscrew shaped piece of iron on the end of a long pole that could be twisted down the barrel to pick up any debris left over from the previous firing of the weapon.
The original article can be found at Worm (artillery) and the edit history here.