In the Hebrew Bible, as well as non-Jewish ancient texts from the region, the North-West Semitic term Rephaite (Heb. plural רפאים, Rephaim; Phoenician: rpʼm) refers either to a people group of greater-than-average height and stature (possibly giants), or to dead ancestors who are residents of the Netherworld.
Canaanite People Group
In the Hebrew Bible, "Rephaites" or "Rephaim" can describe an ancient race of giants in Iron Age Israel, or the places where these individuals were thought to have lived. According to Genesis 14:5, King Chedorlaomer and his allies attacked and defeated the Rephaites at Ashteroth-Karnaim. Rephaites are also mentioned at Genesis 15:20; Deuteronomy 2:10-21, 3:11; Joshua 12:4, 13:12, 15:8, 17:15, 18:16; 2 Samuel 5:18-22, 23:13; and 1 Chronicles 11:15, 14:9 and 20:4.
In the biblical narrative, the Israelites were instructed to exterminate the previous inhabitants of the "promised land", i.e. Canaan, which include various named peoples, including some unusually tall/large individuals. Several passages in the Book of Joshua, and also Deuteronomy 3:11, suggest that Og, the King of Bashan, was one of the last survivors of the Rephaim, and that his bed was 9 cubits long in ordinary cubits. (An ordinary cubit is the length of a man's forearm according to the New American Standard Bible, or approximately 18 inches, which differs from a royal cubit. This makes the bed over 13 feet long, even longer if the cubit was based on a giant's forearm). Anak, according to 2:11, was a Rephaite.
The area of Moab at Ar (the region east of the Jordan), before the time of Moses, was also considered the land of the Rephaites. Deuteronomy 2:18-21 notes that the Ammonites called the Rephaites "Zamzummim". In Deuteronomy 2:11, the Moabites referred to them as the "Emim".
Long dead ancestors
Rephaim have also been considered the residents of the Netherworld (Sheol in the Hebrew Bible) in more recent scholarship. Possible examples of this usage appear as "shades", "spirits" or "dead" in various translations of the Bible. See: Isa 14:9, 26:14, 26:19; Ps 88:11; Prov 2:18, 9:18, 21:16; Job 26:5, and possibly 2 Chron 16:12, where we may read Repha'im as “dead ancestors” or "weakeners", as opposed to Rophe’im, “doctors.” The Heb. root רפא means “heal,” and thus the masculine plural nominalized form of this root may indicate that these “deceased ancestors” could be invoked for ritual purposes that would benefit the living.
Various ancient Northwest Semitic texts are also replete with references to terms evidently cognate with Rephaim as the dead or dead kings. Lewis (1989) undertakes a detailed study of several enigmatic funerary ritual texts from the ancient coastal city of Ugarit. Lewis concludes that the “Ugaritic Funerary Text” provides important evidence for understanding Ugarit's cult of the dead, wherein beings called rapi'uma, the long dead, and malakuma, recently dead kings, were invoked in a funeral liturgy, presented with food/drink offerings, and asked to provide blessings for the reign of the current king. The many references to repha'im in the Hebrew Bible in contexts involving Sheol and dead spirits strongly suggests that many ancient Israelites imagined the spirits of the dead as playing an active and important role in securing blessings, healing, or other benefits in the lives of the living.
“The link between Titan and Poltergeist may very well be adduced from the verb stem, raphah, which means to sink or relax. In Isaiah 5:24 it is the sinking down of hay in flame, in Judges 19:9 the decline of the day, and in Nehemiah 6:9 the sinking motion is attributed to the hands, as in ‘Their hands shall be weakened from the work.’ The list of usages goes on: to withdraw, to abate, to lose heart, to let drop, to abandon or forsake, to let alone. The Repha’im-as-Giants may loom large, but only in the metaphoric sense. They are gigantic precisely because they have withdrawn into the mythic past. Having relaxed their grip on the real world, they’ve become, as the saying goes, mere ghosts of their former selves.” (Levin, 1997, p. 17)[iv] 
- Booth, Scott W. Using Corpus Linguistics to Address some Questions of Phoenician Grammar and Syntax found in the Kulamuwa Inscription at the Wayback Machine (archived March 23, 2012). 2007. p.196.
- Rivka Nir, R. Mark Shipp. Of Dead Kings and Dirges: Myth and Meaning in Isaiah 14:4b-21. p121 2002 - 197 "It is also possible that the distinction here is not between the Rephaim and non-Rephaim dead kings, but rather between the rpim qdmym (Ulkn, Tr 'limn, Sdn w Rdn, Trmn; the “ancient Rephaim”) and the more recent Rephaim (Ammishtamru, ..."
- Matthew J. Suriano The Politics of Dead Kings: Dynastic Ancestors in the Book of ... 2010 p160 "Unlike the texts from Ras Shamra, however, Israelite literature negatively portrayed the Rephaim in order to undermine a politically potent element that was otherwise embraced in Ugaritic tradition. The equation of the Rephaim as dead ..."
- Brian B. Schmidt Israel's beneficent dead: ancestor cult and necromancy in ancient ... 1994 p267 "The Ugaritic rp 'um are repeatedly invoked as confirmation for the existence of both a living and dead biblical Rephaim. De Moor's theory comprises the most compelling and thoroughgoing proposal to date. According to this author,"
- KAI 13.7-8, 14.8, 177.1; CTA 6.6.46-52, CTA 20-22 = KTU 1.161. See the article by M.S. Smith, “Rephaim,” in the Anchor Bible Dictionary.
- T. J. Lewis (professor of Hebrew Bible at Johns Hopkins University), Cults of the Dead in Ancient Israel and Ugarit (Scholars Press, 1989)
- KTU 1.161 = Ras Shamra 34.126
- On the role of the dead and burial customs in ancient Israelite society and the cultures of the ancient Levant generally, see L. Bloch-Smith's Judahite Burial Practices and Beliefs About the Dead (Continuum, 1992).
- Gabriel Levin, Hezekiah’s Tunnel, 1997, Jerusalem, Ibis