When do we use "that" instead of "it"?
Use "it" to refer to something that you're talking about, or the focus of your conversation. Use 'that' to discuss something that another person just said. So a conversatiom might start like this:
A: Hey, what was that you just said?
B: I said "I don't have any beef with him."
A: What does that mean?
Now, since the phrase "have beef" has become the topic of the conversation, you can refer to it with "it":
B: You mean "have beef"? It's a phrase that means that I'm not angry with him, or I don't have any problem with him.
A: Is it widely used?
However, the differences between "that" and "it" are subtle. It usually won't cause any big communication problems if you switch them up.