Hi!
Really quickly:
Jews and Palestinians lived there side by side in peace, before WWII.
This is not true. We have narratives showing as far back as 1885 that there were clashes between Arabs and Jews, they had always had sources of tension in the past (including under the Ottomans in the 1840s for example), and riots occurred in 1920, 1921, 1929, and an Arab Revolt occurred from 1936-1939, and frequent clashes between. There was not a lot of peace going around before WWII, though it was less violent (most would say) before WWI.
When the jews got immigrated to the land of the later state of isreal, who owned it?
Immigration to the later state of Israel, into the region called "Palestine" (note: this was not a state of its own, merely the name for the region at the time), began back when the Ottoman Empire controlled the area. The Ottoman Empire's control spanned much larger areas than Palestine, but they had controlled it for quite a long time. Immigration of Jews to the area was not something that "began" in the 1880s, but it was around the 1880s that people (in pursuit of Zionism) really began to organize immigration to the region. This was the period of the "First Aliyah", where groups like Hovevei and Hibbat Zion (lovers of Zion and Love of Zion) organized settlers (usually from Russia and Eastern Europe) to go and attempt to settle in Palestine.
From then on, immigration continued, but with the founding of political Zionism by Theodor Herzl in 1897 (as a result of the start of the World Zionist Congress, the first of which was in Basel in 1897), one could begin to see immigration come up with the intent of settling Palestine.
After World War I ended, the Ottoman Empire collapsed, and had lost control of Palestine. The people who took over control of the region were the British, and they were officially granted international recognition in light of that control with the British Mandate, the idea of which was started at the San Remo Conference in 1920 and which was formalized in 1922 (and came into effect in 1923). Even until then, however, the control over the area was still British, despite a short-lived attempt by the Syrian king Faisal Husayn in 1920 to add Palestine to his kingdom. He was made king after World War I, but the British eventually chose to stop protecting him from the French (who wanted control of Syria), and when British troops withdrew the French deposed him. His declaration of control over Palestine lasted virtually no time, and effective sovereign control of Palestine remained British from the end of World War I until 1948, when the state of Israel was established.
In theory, the British Mandate was to provide for the eventual creation of a state in the area, according to the Mandate system's set-up. The League of Nations Covenant, precursor to the United Nations, said in Article 22:
Certain communities formerly belonging to the Turkish Empire have reached a stage of development where their existence as independent nations can be provisionally recognized subject to the rendering of administrative advice and assistance by a Mandatory until such time as they are able to stand alone. The wishes of these communities must be a principal consideration in the selection of the Mandatory.
Thus, the idea was that the Mandatory power (in this case Britain) would take into account the communities of the area, and assist them until they could "stand alone" with their own governments and own states. So the area was controlled by Britain, owned by them effectively, with the Mandate set to expire in 1948. What is important to note is that the Mandate recognized that Transjordan (today called Jordan) was part of Palestine, but that the British could separate it off from the rest of Palestine and treat the two sides differently. From Article 25 of the Mandate itself (linked above as "British Mandate"):
In the territories lying between the Jordan and the eastern boundary of Palestine as ultimately determined, the Mandatory shall be entitled, with the consent of the Council of the League of Nations, to postpone or withhold application of such provisions of this mandate as he may consider inapplicable to the existing local conditions, and to make such provision for the administration of the territories as he may consider suitable to those conditions, provided that no action shall be taken which is inconsistent with the provisions of Articles 15, 16 and 18.
The British, as noted in Resolution 181 (the resolution passing the partition plan) had informed the UN that they intended to evacuate no later than August 1, 1948, ending the Mandate. They later updated that to be May 15, 1948. So when the British Mandate was about to expire, the Jewish leadership in Palestine declared (on May 14, 1948) with their Declaration of Independence said:
WE DECLARE that, with effect from the moment of the termination of the Mandate being tonight, the eve of Sabbath, the 6th Iyar, 5708 (15th May, 1948), until the establishment of the elected, regular authorities of the State in accordance with the Constitution which shall be adopted by the Elected Constituent Assembly not later than the 1st October 1948, the People's Council shall act as a Provisional Council of State, and its executive organ, the People's Administration, shall be the Provisional Government of the Jewish State, to be called "Israel".
So essentially from the moment the Mandate ended, the Jews said they would have their government as the state of Israel be established. While they did not delineate specific borders in the Declaration, and there is ample reason to believe they did so in the event they could avoid constraints on which land was theirs if a war erupted (which they expected), they still included the following in the declaration:
THE STATE OF ISRAEL is prepared to cooperate with the agencies and representatives of the United Nations in implementing the resolution of the General Assembly of the 29th November, 1947, and will take steps to bring about the economic union of the whole of Eretz-Israel.
The resolution they are referring to, Resolution 181, did delineate borders, so de facto they were at least working on that basis of hoping to implement the partition plan, though they likely knew such a thing was not possible given that a civil war had raged on from November 29, 1947 (when the plan was passed) until that day, as Arab leadership rejected and Jewish leadership accepted the partition.
Now, I am talking about sovereign state land. This is not a discussion of who owned the private land, because the two are not the same. If I own an acre of private property in the borders of the United States, I do not exercise sovereign control over it. I can't make up my own laws, settle people there and tax them, etc.. I have private control over the land. If you want statistics on that, please let me know.
After the war of 1947 (the civil war where it was only Palestinians and Jews involved) and the war of 1948 (the one where Arab states invaded the region), armistice agreements were signed that altered the borders to more recognizable ones today. These borders are called the "Green Line", and do not include East Jerusalem (de facto annexed by Israel), the Golan Heights (also de facto annexed by Israel), the West Bank (occupied, not annexed), and Gaza (formerly occupied, disengaged from).
This is roughly a crash course in sovereign ownership of the area from the Ottoman period forward.
When the immigration camps and Isreal formed, did they "throw" out the Palestinians that lived there before? If they did, was this by force or could they stay if they wanted to?
This is a source of contention among many, many historians. It depends entirely on who you ask. One of the biggest problems is that unless one was directly expelled, ie. forced to leave, they usually left for a combination of reasons. Refugees fled out of fear, because fighting was taking place in their villages, because of evacuations carried out by Arab forces, etc.. If you want a rough breakdown of prominent historians on the topic, you can check out my post here that talks about the way the "New Historians" of Israel have changed the narrative to reflect more accuracy. However, there are far more historians whose opinions I didn't mention (because, honestly, I have other things to do :P), including Nur Masalha, Khalid Rashidi, Efraim Karsh, Eyal Benvenisti...just to name a few. The general consensus is that some were thrown out, most likely fled as some combination a result of fear, economic hardship, attacks and fighting on their doorstep, being told to leave by Arab authorities, etc., and that the balance of how many in each case is very hard to determine. Benny Morris wrote a book on it in 1988, and updated it with new information released with a new book in 2004. His 2004 book, The Birth of the Palestinian Refugee Problem Revisited is a good read to get an idea of how and what led to the refugee problems from 1948. The main problem facing historians however is the question of how to calculate what caused a refugee to leave. Do we base it on the "last straw" that caused them to leave, or on what caused them the most trouble? Is it fear or economic hardship, and if both then how do we calculate it, which column does it go into?
Other problems, however, are widespread. Lack of documents (which were either destroyed or never taken) from Palestinians themselves are significant problems, and Israeli archives are only somewhat open, with many things still classified. Arab archives on the subject remain entirely closed. With access to that documentation we may get a better idea someday, but thus far it is harder than most would expect to get a true reading of what occurred, and given that only Israeli archives are open, it's more likely that we only get one side of the picture (and in fact, that side may be more critical of Israel than it ought be, since no incriminating Arab documents are really available).