What type of word is this and that?

The words 'this' and 'that' are demonstrative pronouns, adjectives, and adverbs.

The demonstrative pronouns take the place of nouns and indicate nearer or farther; for example:

I like this better than that.

The adjectives describe nouns as nearer or farther; for example:

That car is more expensive than this car.

The adverb modifies a verb or another adverb as more or less in degree; for example:

I wasn't expecting this many responses.

He makes that much money!