Grey Worm is a commander in Daenery Stormborn’s service, leading the Unsullied army that fights for her. The Unsullied are a group of soldiers trained in Astapor. They are created from slaves who are taken when they are children, castrated and trained for years to become the best, cold-blooded fighting machines possible. One of the exercises they are asked to perform while in training is to raise a puppy and then kill it during adulthood.
The reason Grey Worm is named Grey Worm (and other Unsullied are named similarly) is that during training, their names are discarded and forgotten. They adopt lowly names as a reminder of their status as nothing but a desensitized foot soldier to serve their master.
When Daenerys negotiates a “trade” of one of her dragons for the army of 8,000 Unsullied soldiers, she frees them and gives them a choice to either join her and fight for her as free men. The army unanimously accepts.