Many of us know that questo means "this" and quello means "that." They work similarly to English when they are adjectives.
When they function as pronouns, things change somewhat. When it comes to things and ideas, Italian and English can work similarly.
È quello che voglio dire (that's what I mean). Literally, "It's that that I mean".
But when it comes to certain constructions, English has some usage rules that differ from Italian. Sometimes it helps to look at one's native language to get more insight into the differences. Check out this WordReference article about this and that. But with that in mind, let's focus on how Italian works.
When we are choosing something in a shop or at a bancarella at the market, instead of saying, "I'd like that one," we can just use quello or quella. In this case, if there is no noun following them, quello and quella are pronouns.
Vorrei quello (I'd like that one).
Vorrei quello lì (I'd like that one over there).
In the same vein, when talking about people, Italians often use questo/a or quello/a to talk about "this guy," that guy," "this lady/girl/gal/woman," "that lady/girl/gal/woman"). Italians don't need to use "that" as an adjective in this case. They can use questo/a or quello/a as a pronoun. We determine the gender of the person or animal referred to by the ending a or o.
Further, where we might think of using "that" because the person we're talking about is not close by, Italians might use questo (this) anyway, when it is close to them in mind, but not necessarily spatially.
In the example below, the speaker uses both quella and questa to refer to the same person (a girl in a certain class at school). In the first case, it's a pronoun referring to "that girl." In the second case, questa is being used as an adjective describing the same girl.
Quella di quinta C. 'Sta [questa] stronza.
The one from five C. That bitch.
Caption 29, Provaci ancora prof! S2E3 Dietro la porta - Part 2
Play Caption
Let's also note that the speaker truncates questa to 'sta, something that is very common, but doesn't really work with quella.
So in English, you might say, "That idiot!" but in Italian, it might very well be Quest'idiota! It could also be Quell'idiota.
To sum up, it's good to keep in mind that Italians don't always have the same parameters English speakers do when it comes to questo/a and quello/a — this and that.