Black worms in a drain are the larvae of drain flies. They can be killed by removing any breeding sources for the flies and then killing the flies physically or with chemical agents. Drain worms and flies are not harmful to humans, although they are a nuisance.
The first step in removing drain worms is to thoroughly clean the shower and drain. Next, remove all objects from the shower that the flies might use to lay eggs, which hatch into worms. Once the shower and drain are completely clean and free of all foreign objects, use a flyswatter or insecticide to kill the adult flies. With the eggs, worms and flies killed, the drain worms should not return.