Palestine was under control of the Ottoman Empire (based in Turkey, but spread far and wide like the Roman Empire) until the first world war. It wasn't a "country" as such. It was majority muslim with a small jewish minority.
There was a movement called Zionism in America and Europe from the late 1800s, calling for more jews to settle there and eventually establish a jewish state. They considered this their right and destiny according to the Bible.
The Ottomans fought on the side of Germany in WW1 and lost. As part of this process the empire itself imploded and some of its lands, including Palestine, were reconfigured. The British took control of the region under the British Mandate of Palestine, intended to be temporary.
In 1917 the British issued a document called the Balfour Declaration, which outlined their intention to divide the land into separate muslim and jewish countries. There were various discussions and negotiations but all the Palestinian and Arab parties involved implacably opposed the idea.
Zionism continued in the interwar period, steadily increasing the jewish population, then there was a huge influx of jewish survivors of the Holocaust, who were settled there against the Palestinians' will.
In 1947 Britain and the UN formalised the plan for partition and began withdrawal. In 1948 the state of Israel was declared, and many of the Palestinian inhabitants of the area forcibly expelled. The Arab countries in the region declared war on Israel. Israel won that war, establishing its present day borders (including most of what was supposed to be Palestine). The area of Palestine known as the West Bank became part of Transjordan; the area known as the Gaza Strip became part of Egypt.
As neither side ever really acknowledged the other's right to the area, there were ongoing skirmishes and conflicts. The most important of these was the six day war in 1967, which again ended in Israel's favour, and they seized control of the West Bank and Gaza Strip. These are known as "occupied territories" - the inhabitants are not full citizens of Israel, but are not free to pursue their own political freedom outside of it either.
Naturally there's much resentment of Israel's occupation among the Palestinian population there, which results in periodic violent protests and attacks of various kinds. Israel in turn views these as evidence that its neighbours don't acknowledge its right to exist (which is largely true), and that it therefore needs to maintain the territories as a security "buffer zone".
The current attack by Hamas is the latest of these but much larger and more effective then usual.