We use demonstrative pronouns to replace a noun or a noun phrase to show whether something or more things are near or far in space or time.
There are four demonstrative pronouns used as follow:
this is to replace a singular noun (person or thing) that is around or nearby to the speaker.
that is to replace a singular noun that is distant from the speaker.
these is to replace a plural noun that is around or nearby to the speaker.
those to replace a plural noun that is distant from the speaker.
A demonstrative pronoun can be a subject or object in a sentence
Demonstrative pronoun and demonstrative adjective.
A word is not a demonstrative pronoun if it comes before a noun. Such a word is in fact a demonstrative adjective which precedes a noun and acts as a modifier of the noun. It should not be confused with a demonstrative pronoun which does not modify a noun. Unlike the demonstrative adjective, a demonstrative pronoun replaces a noun and stands on its own in a sentence.