The words ‘this’ and ‘that’ are demonstrative pronoun which is used for indicating something. Not only this, but they also come in the category of demonstrative determiners which are used before a singular noun, that tell you which person or object you are talking about.
We use the word ‘this‘ to point out a person or object which is close to us. On the other hand, ‘that‘ is used to point out a person or an object which is farther from you.