We know next to nothing of the earliest inhabitants of the land of Canaan. There were the Rephaim (a race of giants), the Anakim or sons of Anak (also giants, "long necked ones"), and the Avim or Avites (dwellers in ruins) who lost their land to the Philistines.
The descendants of Noah’s grandson Canaan took possession of this land, except for Philistia. Canaan himself had 11 sons and each bore a tribe. 6 of them dwelt in Syria and Phoenicia, and the remaining 5 in Canaan. The Lord mentioned 7 nations by name who inhabited the land of Canaan in the time of Abraham unto the time of Joshua.
The Canaanites, Amorites, Hittites, Jebusites, Hivites, Perizzites, and Girgashites.
Under the leadership of Joshua the Israelites were to conquer the Land of Canaan and utterly destroy the inhabitants.
Deuteronomy 7:1-2 - When the LORD your God brings you into the land where you go to possess it, and casts out many nations before you, the Hittite, the Girgashite, the Amorite, the Canaanite, the Perizzite, the Hivite, and the Jebusite, seven nations greater and mightier than you; and when the LORD your God delivers them up before you, and you strike them; then you shall utterly destroy them. You shall make no covenant with them, nor show mercy to them;
Their religion, like the nations that surrounded them, was idolatrous. They made their sons and their daughters to pass through the fire to Moloch, and they worshipped Baal and Ashtaroth, which included temple prostitution.
God swore that the Israelites would possess this land, and that if they had not done it the land would "vomit them out" because their sins were complete and reached up to heaven.