Abraham's case
Genesis 12 states very clearly that Abram (before renamed to Abraham) was called from his country (or land, v.1). Remember that previously in chapter 11 Terah went out from Ur of the Chaldeans with his children, to Haran. Back to chapter 12, God said that He will give the land to Abram's offspring (v.7). God expresses His ownership of the land, despite the Canaanites inhabiting the land (v.6). Abram moved from Haran to Shechem> Bethel-Ai> Negeb> Egypt(famine)> back to Negeb> Bethel-Ai> Hebron (separated with Lot)> Dan(Gen 14)> Hobah(Gen 14:15)> Salem(Gen 14:17-21)> Hebron> Gerar> Beersheba (Abimelech episode)> Moriah (Isaac offering)> Beersheba> Hebron (Sarah's burial).
Abram was 75 when he left Haran, 100 when Isaac is born (Sarah was 90). When Sarah died at 127, Abram was 137 y.o (back to Hebron again), which means he had been going on a journey for 62 years of his life (simple math). He was not born in Canaan, though Canaan (or Ham) was Shem's brother and were both Noah's sons, but that was about 10 generations before Abraham. He was a stranger to the land, and since he stayed in many places temporarily, he was also a sojourner.
Leviticus' record
Note that in OT concept, the land is God's possession (consistent with Lev 25:23), and Israelites were actually acting as a guest of the land and God entrusted them to work in the land (as a steward/manager). Joshua divided the land by lots, and the Jubilee year system was actually established to exhibit the nature of temporal stewardship (25:10, proclaim liberty throughout the land to all its inhabitants) where God is the Lord/owner of the land. This automatically made the Israelites a sojourner (someone who resides temporarily in a place).
As the 2 books were written by Moses, the consistency between Gen and Lev is apparent. As Abraham was called out of his land to live as a stranger and sojourner, the Israelites were also strangers and sojourners of the land/world. This theme is embedded strongly throughout the OT (arguably throughout Jewish history before they were exiled and conquered), even David referred himself as a sojourner, a guest in the land of God, just like his fathers (Ps 39:12).
Lastly, 'ger' seems to make more emphasize on the state of alien or stranger. Ex 2:22, Moses named his son Gershom, saying, "I have become a foreigner in a foreign land." (NIV). While, toshab carries the meaning of residing in a place that doesn't belong to you, hence, a temporary residence. This concept actually survived through NT as well. A part of Christ's high priestly prayer goes:
13 “I am coming to you now, but I say these things while I am still in the world, so that they may have the full measure of my joy within them. 14 I have given them your word and the world has hated them, for they are not of the world any more than I am of the world. 15 My prayer is not that you take them out of the world but that you protect them from the evil one. 16 They are not of the world, even as I am not of it. (John 17:13-16, NIV)
As the believers of old (in the OT), Christians are also called to live in the world, but not of the world.