How the /kill Command Works
The syntax is simply /kill <target> — the target selector decides what dies. /kill @e removes every entity in the world (players excluded in singleplayer only if no players match), @e[type=minecraft:zombie] removes one mob type, and @e[distance=..10] removes everything near the executor.
Examples
Remove every zombie in the world.
Clean up dropped items within 20 blocks.
Remove all entities within 10 blocks of the executor.