The word 'that' is one of the most grammatically versatile words in the English language, serving simultaneously as a demonstrative determiner, a demonstrative pronoun, a relative pronoun, a conjunction, and an adverb. This multifunctionality is not a modern development — Old English 'þæt' already served most of these roles, and the word's grammatical flexibility traces back to the Proto-Indo-European demonstrative system.
It descends from Old English 'þæt,' the neuter nominative and accusative form of the demonstrative pronoun, from Proto-Germanic *þat, from PIE *tód, the neuter of the demonstrative pronoun *tó- (that, the one). The PIE demonstrative *tó- is one of the most important and prolific roots in the entire family. Its reflexes include virtually every 'th-' function word in English: 'the' (from the Old English instrumental 'þē'), 'this' (from *þat-si, 'that-here'), 'there' (in that place), 'then' (at that time), 'than' (from that, by comparison with that), 'thence' (from that place), 'thus' (in that manner), 'though' (despite that), and even 'they/them/their' (borrowed from Old Norse, but ultimately from the same PIE root).
In other branches of Indo-European, the same root is equally productive. Latin had no reflex of *tó- as a demonstrative (it used 'ille,' 'iste,' and 'hic' instead), but Sanskrit 'tad' (that, it) is the direct cognate of 'that,' and the Sanskrit demonstrative paradigm (sa/sā/tad for masculine/feminine/neuter) is remarkably close to the reconstructed PIE forms. Greek 'tó' (τό, the neuter article) also descends from this root and shows how a demonstrative becomes a definite article — precisely the same development that occurred in Germanic, where *þat became 'the.'
The phonological history of 'that' illustrates Grimm's Law in miniature. PIE *t became Proto-Germanic *þ (a voiceless dental fricative), which is spelled 'th' in Modern English and pronounced /ð/ (voiced) in function words like 'that,' 'the,' 'this,' 'there,' 'then.' The voicing of the initial fricative in these words is an English-specific development — in Old English, the letter thorn (þ) represented both the voiced and voiceless sounds, and the voiced pronunciation in demonstratives arose because these high-frequency function words were typically spoken in unstressed, rapid-speech positions where voicing naturally occurs.
The that/this distinction — distal versus proximal — is a fundamental feature of human spatial cognition encoded in grammar. Nearly every language has some version of this contrast, though the number of distance categories varies. English maintains a strict two-way system inherited from Proto-Germanic, where 'that' is the unmarked default and 'this' is the marked proximal form.