Israel became independent on May 14, 1948. On May 15, the Arabs invaded. Israel hastily scraped together an army and air force, and beat back its assailants (the "War of Independence").
In 1956, Egypt nationalized the Suez Canal, resulting in hostilities from England and France (the "Suez Crisis"). Israel came into that conflict (not really big enough to be called a "war") as an ally of England and France, who did most of the fighting, and Egypt lost again.
In 1967, Egypt and Syria began the chants of "Throw all the Jews into the sea" again, and massed 2,000 tanks and armored vehicles, and hundreds of thousands of armed troops and heavy guns, around Israel on all sides. Israel was smaller than Vermont at the time. This time Israel didn't wait for the inevitable, but struck first, destroying most of the surrounding forces and chasing the remnants of Egypt's armies all the way to the Suez Canal. This time it took Israel just six days to defeat the combined forces of hostile countries twenty times her size (the "Six-Day War").
After driving out all hostile forces in 1967, Israel occupied the Gaza Strip and the entire Sinai Peninsula between Israel and Egypt (tripling Israel's size), and the West Bank and Golan Heights between Israel and Syria/Jordan, to provide for defensible areas between them and their attackers. In later negotiations, Israel gave the Sinai back to Egypt in exchange for a promise of peace, but kept the high ground from which Syria had been firing artillery shells into Israeli villages below for years.
The Arab countries still didn't take the hint, and attacked yet again in 1973. They achieved surprise by attacking on Yom Kippur, Israel's holiest holiday, and made significant inroads before Israel marshaled its forces and went on the offensive. This time it took Israel less than three weeks to decisively defeat the vastly more numerous invaders (the "Yom Kippur War").
People keep forgetting that one of the results of a war, is that territory changes hands. The Arabs keep screaming for the return of Gaza, the West Bank, and Golan Heights, forgetting that they lost them as a result of their own hostile actions and losing the wars they started against Israel.
Don't like to lose terrritory? Don't threaten or attack your neighbors when they didn't threaten you. Especially neighbors who can kick your ass.