There are really just two big wars in the middle east, plus a unique combination of post-colonial "strongman" leaders sitting on top of oil wealth who occasionally get dragged into conflicts or trigger US reprisals.
The two big ones are "Israel vs the Arab World" and "Iran vs US & Saudi Arabia". The state of Israel was acquired by a mixture of political action before WW2 (Balfour Declaration) and military/terrorist action afterwards. From the inception of Israel in 1948 it has been attacked by its Arab neighbours, while also driving out Arabs previously resident in some areas of the disputed region into an increasingly tiny "Palestine". Both sides have factions in their domestic politics that benefit from continuing the fighting, and both have the ability to provoke escalation from the other.
The Iran/Saudi conflict is driven both by the religious conflict (Sunni/Shia Islam and control over Mecca) and by their status as business competitors in oil export. The risk that Iran may acquire nuclear weapons has also been a factor in escalation.
The two are linked by the widespread use of proxy forces and deniable terrorism, including such organizations as Hezbollah. The US's involvement with the region due to oil has led to it being used as a "proxy force" in essentially local conflicts by whichever leaders can make the most convincing case that some other country is a threat.
Most countries had strongmen leaders after independence or revolution in the mid-20th century, and this facilitated escalation as in a non-democratic country it's hard to protest against more war. This description covers Saudi Arabia (non-democratic monarchy), Libya (Ghaddafi), Iraq (Saddam), Iran (Khomeni), Syria (Assad) etc.
At one point there was a "pan-Arabism" movement intended to unify the region and reduce conflict. This also functioned as an anti-Israel alliance. It was not successful.
As a "worked example", the Lebanese civil war shows how all the other factions got involved, including Israel, Syria, and Iran via Hezbollah.