According to Genesis 10:14 and 1 Chronicles 1:12, the Philistines descended from a group called Casluhites who were in Ham's family line (descendants of Mizraim) after the Flood. Deuteronomy 2:23 and Amos 9:7 state that some of the Philistines once resided on Caphtor, a name for Cyprus at one point in history and took the lands from the Avvites.
Various verses suggest the Philistines lived in the region on the southeastern coast of the Mediterranean Sea between Canaan and Egypt's Sinai peninsula. As early as Genesis 21, Gerar is named a town in Philistine land (southeast of Gaza). Abraham had a peace treaty with Abimilech because they saw that God kept blessing Abraham. During the drought in Genesis 26, Isaac lived in Gerar instead of traveling to Egypt as Jacob's family did, especially considering the outcome of that. Abimilech was stated as king of the Philistines in that passage. Exodus 13:17 and 23:31 were references where God granted the Israelites a passageway past Canaan.
Five Philistine rulers were stated in Joshua 13:2-3 & Judges 3:3 in Gaza, Ashdod, Ashkelon, Gath and Ekron. The Israelites fought against the Philistines throughout Judges: chapter 3; 10:6-11; 13:1,5; 14:1-4; chapter 15; and chapter 16.
In 1 Samuel chapters 4 and 5, the Philistines captured the Ark of the Covenant from Ebenezer, taking it to Ashdod. After misfortunes kept happening while they possessed
the Ark, the Philistines viewed this as a curse and returned the Ark to Ekron in chapter 6. As a continuation of the conquest of Canaan, the Israelites and Philistines kept fighting in chapter 7.
1 Samuel 7:13-15 states:
13. So the Philistines were subdued and did not invade Israelite territory again. Throughout Samuel's lifetime, the hand of the LORD was against the Philistines.
14. The towns from Ekron to Gath that the Philistines had captured from Israel were restored to her, and Israel delivered the neighboring territory from the power of the Philistines. And there was peace between Israel and the Amorites.
15. Samuel continued as judge over Israel all the days of his life.
In 1 Samuel 9:15-16, Samuel appoints Saul as Israel's first king to "deliver my people from the hand of the Philistines" with another mention of this in 12:9. Chapter 10 verse 5 calls the town Gibeah "a Philistine outpost" and 13:3 also calls Geba another outpost. King Saul & his son Jonathan fought against the Philistines in chapters 13 and 14. In chapter 17 David fights Goliath who was from Gath. In his jealousy of David's success, Saul sets the Philistines against David in chapter 18. So, David fights the Philistines in 19:5-8. 1 Samuel 21:9 and 22:10 mention the sword of Goliath which was taken as war booty. Squirmishes with the Philistines continue in chapter 23 with a brief mention in 24:1. Tensions between king Saul and David continue as David flees to Gath. David sought refuge from Saul by asking Achish son of Maoch king of Gath for sanctuary there. These events transpire in 1 Samuel chapters 27, 28 and 29 and also appears in 1 Chronicles 12:19. Psalm 56 might have been written in this time frame, too. David fights against the Amalekites in chapter 30 where there is a mention in verse 16 of the "land of the Philistines". The Philistines fought hard against the Israelites on Mount Gilboa in 1 Samuel Chapter 31 and also in 1 Chronicles 10 where they killed Saul's sons, leading Saul to commit suicide.
War with the Philistines continues in 2 Samuel as noted in chapters 1 and 3 despite the division of lands already taken into the Northern kingdom of Israel & the Southern kingdom of Judah (which sides with king David). By chapter 5, King David defeated the Philistines & took the land from the Jordan to the border of Egypt (Sinai peninsula). Other mentions of the Philistines can be read in 2 Samuel chapters 19, 21 and 23 as well as 1 Chronicles 11:13-18, 1 Chronicles 14:8-18, 1 Chronicles 18:1-11, and 1 Chronicles 20:4-5. 1 Chronicles 11:16 mentions a Philistine garrison in Bethlehem.
When David died, Solomon became king. A reference to the Philistines during his reign can be found in 1 Kings 4:21 and 2 Chronicles 9:26. After Solomon died, Philistines moved back into the area as is depicted in 1 Kings 15:27.
Towns where Philistines lived included Gaza, Joppa, & Gezer. A town called Gibbethon in 1 Kings 15:27 and 16:15 was called a "Philistine" town.
In 2 Kings 8:1-3, the prophet Elisha foretold a famine and told the widow and her resurrected son to leave the area. She moved to "the land of the Philistines" for 7 yrs. By 2 Kings 18:8, we also see fighting with Philistines when Judah's king Hezekiah again subdued them.
2 Chronicles 17:11 mentions Philistines bringing Judah's king Jehoshaphat items for tribute. But, in 21:16 king Jehoram has problems with Philistines and Arabs. Later, king Uzziah "war against the Philistines and broke down the walls of Gath, Jabneh and Ashdod" as stated in 26:6-7. The Philistines resurfaced in the reign of king Ahaz, raiding and taking several towns in 28:18.
Psalms 83:7, Isaiah 9:12, 11:14 and 14:28-32 mention the Philistines as enemies of the Israelites.
Isaiah 2:6 says the Philistines practiced divination.
Jeremiah 25:20 foretells the Babylonian conquest of the region, including Philistine kings in Ashkelon, Gaza, Ekron, and Ashdod. Jeremiah 47, Amos 1:8 and Obadiah 1:19 also prophesy against the Philistines.
Jerusalem is portrayed as so corrupt that even the "daughters of the Philistines" are surprised of the conduct in Ezekiel 16 verses 27 and 57. Ezekiel 25 and Zephaniah 2:5 prophesy against Kerethites (in NIV, King James calls them Cherethims) that apparently resided in Philistine territory.
Amos 6:2 again calls Gath a Philistine town.Zechariah 9:6 hints that Ashdod was the most prominent Philistine town.