Genesis 26 is one of those inserted interludes in the story that gives an account of Isaac's dealings with Abraham's old friend King Abimelech. As you read these accounts, you begin to feel somewhat sorry for Abimelech, as Abraham has messed with him on more than one occasion. In that story, we see in Abimelech's long-suffering a picture of God's mercy toward us as well - although we are chosen people, we tend to treat God shabbily at times, and yet He still loves us and reaches out to us. Seeing that same long-suffering attitude in Abimelech (and he really has tolerated a lot!) reminds us that God also puts up with a lot from us too, and like Abimelech in the Scriptural accounts, God still gives us other chances even when we don't deal with Him squarely too. It also is a lesson to us that not all of the "Gentiles" in the Bible were necessarily bad people - at times, they act better than the Chosen do! That being said, we see in Genesis 26 some experience Abimelech has with Isaac, and it proves the point further.
If we look at the first 33 verses of Chapter 26, we see what is going on. Rebekah, you recall from the last couple of lessons, was an extremely beautiful woman. At this point in time, a famine occurs near where Isaac lives, and Isaac is forced to seek better pasture land for his herds, and he goes to Abimelech for help. Abimelech, who had previously been mentioned as being "King of Gerar," is now called "King of the Philistines," and in this account we have the first revelation of Abimelech's nationality, as well as the first mention of a group of people that would later cause the Israelites a lot of problems. The Philistines, according to the Genesis 10 "Table of Nations," are descendants of Caphtor, who was a son of Ham's son Mizraim. On a more secular historical note that sort of corroborates with the Biblical record, the Philistines were originally from the island of Crete, and perhaps were part of the same culture that created the earlier Minoan civilization on Crete before the Indo-European Mycenaean peoples (descendants of Japeth's son Javan, according to the Scriptural record) supplanted them later. Secular sources also note the strong ties that Minoan Crete had with ancient Egypt ( https://en.wikipedia.org/wiki/Minoan_civilization - accessed 10/6/2016) and this would make sense in lieu of the fact that the Minoans and Egyptians may share a common heritage.