demonstrative adjective (determiner), pronoun
Opposed to "that", "this" being close to the speaker, "that" being farther away. The initial 'th', common to both is a deictic.