The rules of war, also known as international humanitarian law:
Protect those who are not fighting, such as civilians, medical personnel or aid workers.
Protect those who are no longer able to fight, like an injured soldier or a prisoner.
Prohibit targeting civilians. Doing so is a war crime.
Recognize the right of civilians to be protected from the dangers of war and receive the help they need. Every possible care must be taken to avoid harming them or their houses, or destroying their means of survival, such as water sources, crops, livestock, etc.
Mandate that the sick and wounded have a right to be cared for, regardless of whose side they are on.
Specify that medical workers, medical vehicles and hospitals dedicated to humanitarian work can not be attacked.
Prohibit torture and degrading treatment of prisoners.
Specify that detainees must receive food and water and be allowed to communicate with their loved ones.
Limit the weapons and tactics that can be used in war, to avoid unnecessary suffering.
Explicitly forbid rape or other forms of sexual violence in the context of armed conflict.