To burn corpses in Project Zomboid, you will need to make a campfire, pile the bodies on top of it, and then set it on fire. Doing so will then start the fire inside the campfire, and it will spread and burn the corpses placed on top of it.

The campfire option is also the only vanilla option players have to burn zombies efficiently. That said, if you want to improve the rate the fire burns zombies, we would recommend pouring fuel on top of the bodies. 

However, be mindful of your surroundings and do not start a fire on a grassy area. The reason is that you run the risk of having the fire spread to trees, or even worse, buildings, which can destroy loot if the fire becomes uncontrollable. 

If you want a much safer way to burn bodies without running the risk of setting houses or forests down, we recommend downloading the Crematorium mod.

Crematorium allows users to use campfires directly to burn corpses through a new function. Players can also use this mod to burn corpses in antique ovens and other objects like fireplaces.

To use this mod, simply have a corpse in your hands and right-click a fireplace or campfire. After right-clicking cremation, and your character will start burning the zombie body. 

For more on Project Zomboid, we at PGG have you covered.