It and that are both demonstrative pronouns in English Grammar. Anyhow, they are used differently when it comes to grammatical peculiarities. Look at the two sentences, ‘he looks at it’ and ‘he looks at that’. In the first sentence the demonstrative pronoun ‘it’ indicates something which is near. On the other hand the demonstrative pronoun ‘that’ in the second sentence indicates something which is far.
Hence it is to be understood that while ‘it’ indicates something near, the demonstrative pronoun ‘that’ indicates something far. This is one of the major differences between ‘it’ and ‘that’.
The word ‘it’ is used in emphasis as in the sentence ‘yes, it is’. Here the word ‘it’ emphasizes something that was said by somebody earlier. In many cases the word ‘it’ is used in the sense of generalization as in the expression, ‘it is so’.
The word ‘that’ is sometimes used as a kind of conjunction as in the sentence ‘it is important to know that you have to drink a lot of water every day’. Here the word ‘that’ connects the two sentences ‘it is important to know’ and ‘you have to drink a lot of water every day’.
The word ‘that’ implies time as in the sentence ‘that is the end of the show’. Here the word ‘that’ implies the time which marked the end of the show. The words ‘it’ and ‘that’ are used to convey some idea or happening sometime back and long time back respectively.
Look at the two sentences ‘you knew it’ and ‘he knew that’. In the first sentence the word ‘it’ conveys a happening that took place sometime back. On the other hand the word ‘that’ in the second sentence conveys a happening that took place long time back. The two demonstrative pronouns ‘it’ and ‘that’ are thus used differently.