How international law applies to war, and why Hamas and Israel are both alleged to have broken it

Hamas and Israel have both been accused of breaking international law during their latest conflict, and the United Nations says it is collecting evidence of war crimes by all sides.