Diplomacy can be used because diplomats create treaties and agreements on problems and these treaties resolve problems in such a way that it benefits both sides. If it doesn't benefit both sides, then it's usually as a result of a war effort. Good diplomats for example like Henry Kissinger can completely turn the way a politician behaves, like he opened China a bit to the west even though it was believed to be impossible.