Casualties and Hospitalization
The number of casualties on each side is directly dependent on the damage and defense of each army, as well as on the elemental damage.
The higher the damage compared to the opposing defense, the more casualties are achieved.
Injured troops are those that need to be healed after a fight. Your troops have a chance to be injured instead of being killed in any battle. The chance of death is lower when defending, and higher when attacking.
Hospitals host and heal your injured troops. Healing takes time and resources. When injured troops require medical attention you will see the Hospitals indicate that they are waiting for action:
Your Hospitals have a limit to the number of troops which can be kept in there. Once your Hospitals are full, any additional troops that are injured will die. Build and upgrade as many Hospitals as you can to increase your limit and prevent those extra deaths. Research Divine Powers related to hospitalization to ensure more of your injured troops are able to enter the Hospital after becoming casualties of war. You can also use Entmoor as your City Guardian, as it will increase the capacity of your Hospitals.
Casualties when defending
When defending a city, your troops will never immediately die. They will always be hospitalized, unless your Hospital capacity is exceeded. Only at this point will your troops start dying. Always make sure to build your Hospitals up to the highest possible level!
The number of fallen units being hospitalized is different when defending a farming ground. In this scenario it is 60%.
Casualties when attacking
When attacking another player, 50% of your fallen troops will be always saved and will go to the Hospital instead of dying (this number is 95% for attacking Dungeons). The condition is of course that there is space in your Hospitals. A percentage of your units will be also revived after the battle, so even if your attacking army is wiped, this "safety net" mechanic will protect you from suffering loses from which it would be too hard to recover.
Casualties when reinforcing an ally
Calculation of casualties when supporting is ally is done according to the stats of the ally's city. The rule about always trying to hospitalize fallen units (in your own Hospital, however) applies here as well.