Great. Let's get down to the nit and grit of history.
First, what's Israel's deal with Judea and Samaria?
Thousands of years ago, Jews lived there. This is evidenced by biblical, historical and archeological records. Several exiles removed them from there, but they stilled dreamed for many thousands of years of returning. Naturally, though, successive foreign conquests brought with them foreign settlers, such as the people we now call the Samaritans and the Arabs who now identify as Palestinians.
The origin of the term Palestine itself is debatable. Most believe that it comes from the Greek pronunciation of the P'lishtim, or Philistines in English, the possibly Minoan-originating people that lived on the coast of Israel, but some think that it comes from the Greek "palaistís" or wrestler, which would be a partial translation of the name Israel, which means "wrestles with God" in Hebrew, echoing back to the biblical story of Jacob wrestling with the angel. Either way, the name "Palestine" has nothing to do with the Arabs that now use that term. And in fact, they did not identify with the term even at the time of the British Mandate, but merely saw themselves as part of the Arab collective. It was due to the machinations of the British and the French that we now have the modern borders that created Jordan, Lebanon, Syria and other Arab countries, seemingly dividing the Arab people into geographical ethnicities: The Jordanian Arabs, the Syrians, the Lebanese, etc. These are, however, artificial divisions, although it's possible that nowadays they've started to root themselves more in the mentality of the Arab people. By the way, the Lebanese aren't the original people of Lebanon. Those were the Phoenicians. And the original Syrians were the Assyrians. But people get around, you know?
What's Israel's deal the Judea and Samaria today?
As we've established, the Jews dreamed of returning to all parts of Israel that they used to live in thousands of years ago. However, when, after years of working hard to convince the world powers to allow them to establish a Jewish state in the Land of Israel, the nations agreed but gave Judea and Samaria to the Arabs, the Jews (in general; you can never expect 100% agreement) resigned themselves to taking what they could get. The original partition plan established what would be known as Israel mostly in areas that either had large Jewish populations or were largely unsettled by any people (for example, the large Negev desert area), whilst the Arab country would be established where there were large Arab populations, including Judea and Samaria.
The Jews ultimately accepted the offer while the Arabs didn't. Again, though at this point there were some young new Arab countries, the Arabs living in the British Mandate still viewed themselves as part of the Arab collective. So when the foreign Arab leaders told them to turn down the deal and to attack the Jews, they did. The Jews proceeded with the partition plan, and were promptly attacked by the neighboring Arab countries. The local Arabs - those that turned down Israel's offer of peace and citizenship in the young Jewish country - either joined the ranks of the attacking Arab countries or ran away. Either way, they were convinced that their armies would annihilate Israel and they would return as conquerors and settle not only in Judea and Samaria, but also in Jewish cities such as Tel Aviv and Petach Tikva.
1948 and 1949 came and went, and Israel was victorious. After the war,
armistice agreements between Israel and the enemy Arab countries were agreed upon, once again dividing the territory. Here's a 1955 UN map:
View attachment 50592
You may notice something curious: No country known as "Palestine" appears anywhere! Why was that so?
The reason being that Jordan received control of most of the area originally allotted to the Arabs living in British Palestine. Some small portions were handed to Syria in the Golan and the Gaza Strip was given to Egypt. No new Arab country was founded at the time.
The Inter-war Period:
Let's move on. Jordan was now controlling Judea and Samaria. At the time, this area threatened Israel because multiple terrorists crossed the border - the Israeli-Jordanian border, that is - entering from Jordan-controlled Judea and Samaria into Israel and attacking the Israelis. You can read about them
here and the original Israeli plan
here. The bottom line is that this area of Jordan posed a significant threat to the safety of Israel.
The 1967 Six Day War:
Israel launched the war after having been threatened by the neighboring Arab countries, and in particular, by
Nasser, the President of Egypt. I won't get into all of the details of the war. For what's relevant for this subject, suffice it be said that Israel had reached a pre-war agreement with King Hussein of Jordan that the Jordanians would not enter the upcoming war. However, Hussein, upon hearing false claims of victory from Egyptian, Syrian and other countries' radio broadcasts, decided he wanted a piece of the action and began bombing Jewish neighborhoods in West Jerusalem (under Israeli control since 1949). After much debate, the Israeli government decided to retaliate, and proceeded to storm Jordanian-controlled Eastern Jerusalem. They were victorious on that front. However, in order to properly divert the Jordanians' attention, the attack was three-pronged: Other Israeli forces attacked Jordan at Latrun and Qalqilya, and these attacks proved successful as well. Israel proceeded to move further into Jordan-controlled Samaria to clear out the Jordanian artillery forces that had been threatening Israeli cities and towns outside of Judea and Samaria. From there the battle moved to Jenin, being that it was a key strategic location. The Israelis hoped that capturing Jenin would convince Jordan to back off. Jordan continued to wage war, and so Israel proceed to capture more and more territory, until Samaria was entirely under Israeli control.
Around this time, the Jordanians retreated from Judea and Israel took control of that area as well. Thus, the whole of Judea and Samaria came under Israeli control.
The post-War period:
The first Israeli settlements in Judea and Samaria were constructed by returnees to places previously populated by Jews during the British Mandate: That's East Jerusalem, Gush Etzion, Hebron and some other places. Later, particularly from the mid-70s and onwards, many new towns and even cities were established.
Israel has not officially recognized the Fourth Geneva Convention as valid in terms of Judea and Samaria, being that Jordan originally captured Judea and Samaria
against the 1947-48 UN partition plan, during the '48-'49 War period, which means that those areas legally never belonged to Jordan, at least per UN agreements, and therefore, in Israeli hands, they are not considered "occupied" by Israel, thus not subject to the agreements of the Convention. However, Israel, on its own accord, decided to follow at least some of the Convention rulings when dealing with Judea and Samaria, which created a whole load of internal Israeli legal issues with the creation and expansion of new towns and cities.
Today:
The Oslo Accords in the '90s brought the creation of the Palestinian Authority, an autonomous Arab government controlling Area A and Gaza and some portions of Area B and the IDF withdrew from these areas. Together with the creation of the PA, the Arabs were given weaponry and promptly used them against Israel. This brought upon the lead-off to the Second Intifada and the Intifada itself, where hundreds of Israelis were murdered in the five year period between 2000 and 2005 and many more injured. To put an end to the violence, Israel began
Operation Defensive Shield to confiscate weaponry in the PA area. The operation was mostly successful with regards to collecting weaponry, but was unsuccessful in dampening the violence of the Intifada.