This varies a lot. Each war and each battle is very different so the logistics is handled differently. In most wars the lines of battle move too fast for dead bodies to become a problem. The front lines will move quickly on and the dead can be handled by either the civilian population or by the rear military logistics. If the front lines gets bogged down for some time then the transport of dead bodies is generally not a high enough priority as food, ammunition, wounded, defenses, reinforcements, etc. take priority over dead bodies. So the front line troops might end up burying bodies in shallow graves and mark them so they can be moved after the battle.
There are some rare battles that have taken place over months with the same areas near the front lines. Dead bodies can be a problem in these as they can spread disease, feed vermin and make life unpleasant for the soldiers. When there are lulls in the battle, for example at night, then soldiers would often take it upon themselves to remove dead bodies. Preferably carrying them back to where the logistics can take them away but a lot were buried in shallow graves close to where they fell. But again the fighting takes priority over the dead so bodies could be left out in the open for the duration of the battle.
There have also been some ceasefires to take care of dead and wounded. These are the exceptions though and are usually noted prominently in the history books as an exceptional show of compassion.
The US is exceptional in that they prioritize the collection and identification of own dead soldiers quite high. This started in WWI where dead bodies on the battlefield was a big problem already and the US entered the war with relatively little support among the population. So they set up own logistics unit to collect and identify the dead and if possible ship them home, and if not then give them a full proper burial. And this practice continues on to this day and if anything the priorities are even more shifted towards collecting their dead. In a lot of cases soldiers would even risk their own lives in order to not leave a dead body behind.
Latest Answers