In "this is hot," "this" is a pronoun (pronome). It refers to some particular thing. You start to drink your coffee. You say "Ouch! This is hot." It means "the coffee is hot." The grammar is the same as in "the coffee is brown," "the coffee is good," or "the coffee is strong."
"It is hot" is complicated. In the phrases "It is hot today," "It is hot outside but is is cool in the house," or "It is hot in the city of Phoenix, Arizona," "it" doesn't really refer to anything. The word "it" is sometimes called a "dummy subject" or "empty subject" or "ambient subject."
If we just say "It is hot" with no other context, it means "the climate, or the weather, is hot." We also say "it's raining," or "it's dark." You cannot answer the question "WHAT's raining?" "It" doesn't refer to anything.
Portuguese uses something similar, I think: "Está quente. Está chovendo."
The "it" in "it is hot" COULD refer to something, but only if it's clear from context. For example, "Taste the coffee, please." "Ouch! It's hot!" Here, "it" is a regular pronoun. It refers to "that plate." "It's hot" means "the plate we are talking about is hot." Since we both know we are talking the coffee, you could say either "Ouch! It's hot!" or "Ouch! This is hot," and they would mean the same thing.
If you step outside and it's a hot day, you could say "Wow! It's hot!" But you couldn't say "This is hot" (or "This is raining" or "this is dark.")