You use "this" when referring to something close by. You use "that" when referring to something far away.
This apple in my hand.
That girl over there.
This burger is delicious.
I heard that restaurant has good food.
Also, you would use "this" if you are in a place, and "that" if you are not in a place.
This party is a lot of fun.
That party at John's house was a lot of fun.
You use "It" if you want to refer to something, without saying exactly what that something is.
For example, you could say "the apple is red," or you could say "it is red."
"The car is very fast." or you could say "It is very fast."
Remember, you never use "it" when referring to a person. You would use "he" or "she" instead.
John is my friend
He is my friend.
Jennifer is my classmate.
She is my classmate.