Israel and Hamas have reached an agreement to end the fighting in Gaza. The U.S. played a key role in the deal, which involves a multi-phase ceasefire.