Israel is at peace with Egypt because Anwar Sadat lost the Yom Kippur War and decided to come to terms with Israel. Jordan, Egypt's ally, followed suit a generation later. In all these cases, as in hundreds of earlier ones, war produced a winner and a loser, and peace was imposed by the one on the other.
Inconclusive wars produce uneasy peace or no peace at all, as in Kosovo and Iraq.
Having failed to destroy the belligerent regimes in Belgrade and Baghdad, we're unable to get a satisfactory peace and the threat of further violence continues unabated. Tensions in the ongoing unpleasantnesses between India and Pakistan in Asia, and between Israel and Syria in the Middle East, have not lessened, despite a rash of news stories promising major breakthroughs. Indeed, the usual group of unnamed sources are now muttering darkly about an increase in violence. Israel is at peace with Egypt because Anwar Sadat lost the Yom Kippur War and decided to come to terms with Israel. Jordan, Egypt's ally, followed suit a generation later.