From the Super Mario Wiki
Koopa Zombies are a type of mutated, Bowser-like creatures which were created when humans came into contact with the garbage of Bowser and the Koopalings. Koopa Zombies show little to no intelligence, though they seem to be driven by the desire to blindly follow Bowser, whose surname, Koopa, they continually chant.
In The Adventures of Super Mario Bros. 3 episode "Recycled Koopa", after being exposed to the dumped garbage of Bowser and the Koopalings, the populace of Brooklyn begin to change into Koopa Zombies, who proceed to aimlessly wander the streets of the polluted city. It is only when Bowser himself order the Koopa Zombies to hunt down and attack Luigi and Mario (who have begun to regress to Koopa Zombie himself) that the creatures start acting, attacking Mario and Luigi wherever they go, also using enemies like Bloober Babies and Fire Snakes.
The human populace of Brooklyn, as well as Mario, are eventually returned to their original, normal forms when Luigi cleans up all of Bowser and the Koopalings' garbage.