Palestine was never a country. Up until 1917 it was part of the Ottoman Empire. When that empire dissolved in WW1, the British took over administration of it in 1917 as "The British Mandate of Palestine".
It had always had a majority Arab/muslim population and a minority jewish one. The Zionist movement began in the 19th century based on the belief that it was the jews' "God given" homeland, and encouraged jews from elsewhere to go and settle there, gradually increasing the size of the jewish minority both up until 1917 and after, through the period of the mandate.
At the end of WW2 a lot of concentration camp survivors were resettled there. This is sometimes misleadingly described by Pro-Palestinian people in the west as a completely new thing - a whole bunch of jewish people just "suddenly" "invading" Palestine. In reality it was one further stage in the ongoing process of Zionist settlement.
The British had wanted for some time to withdraw from the mandate, and consulted with the leaders of both populations and various parties how to do that. They ended up with a partition plan to divide the mandate territory in two, one majority Arab/muslim (Palestine) and one majority jewish (Israel). The jews accepted this plan; the Palestinians didn't. (Actually I'm not sure that's quite true: it was not entirely clear who spoke for the Palesitnians and there is some evidence of broad agreement, but the neighbouring Arab countries were totally, implacably against).
The British went ahead and withdrew on this basis anyway in 1948. Israel declared its nationhood and the Arab League immediately declared war on it, vowing to wipe it out. Israel won that war. As part of the settlement, Jordan got the west bank and Egypt got the Gaza strip.
There were continual simmering tensions after that erupting into bloodshed on various scales. In 1967 Israel was attacked in the 6 day war, but again won, and in the settlement claimed authority over the west bank and Gaza strip. These are known as the "occupied territories". Israel sees them as a "buffer zone", necessary around Israel proper for national security, being surrounded as it is by enemies. Unfortunately there are people (the Palestinians) who live in them, and are treated as second class citizens.
There is a thread running through much of the Islamic world in the region of implacable opposition to any possibility of a jewish state existing these. This for example is (basically) the position of Hamas. Israel sees the Palestinians' support for Hamas as an indication that negotiation is practically impossible and they need to take a hard line. Western pro-Palestinians OTOH see Israel's terrible oppression of the Palestinians, racism and appalling attitude to human rights as justification for the Palestinians turning to desparate measures.
Who's right depends on who you listen to, and a whole bunch of ultimately very subjective questions.