I explained my perspective on this: after the six-day war, Israel conquered the lands currently forming today's Palestinian territories and occupied them. As with any occupying force anywhere in the world, the occupied people started resisting this occupation.
The Oslo accords happened between the occupying force, Israel; and (representatives of) the resistance movement - represented by the PLO at the time, mostly. The accords marked the beginning of the modern Palestinian state (the "official" beginning was Yasser Arafat's 1988 declaration of independence, but that couldn't even happen in Palestine). They were maybe closer to the Good Friday deal in Ireland than to any kind of inter-state peace treaty.
So again, any regular war ended a loooong time ago (basically after the six-day war, but that was re-attempted in the 1973 Yom Kippur war); it ended with Israel de facto ruling all of the territory of modern Israel + all of the Palestinian territories. However, there are two aspects that prevented the fighting stopping there: (1) Israel wants to be a Jewish state, so they did not want to officially incorporate the Palestinian territories, since especially in 1967 they would have meant that the vast majority of Israel's population would have been Arabic; and (2) the people in the occupied territories started a bloody resistance movement against the occupation - fueled by historic religious hatred and concerns, but also by item (1) - the knowledge that they would not be allowed to be full citizens of Israel, even if they wanted to.