To expand on my comment correcting the above:
Hearsay is an out-of-court statement, offered as evidence in court to prove the truth of the matter asserted in the statement.
So two things make a statement hearsay: where is was uttered, and what the party putting into evidence is trying to prove by doing so.
Q: “What, if anything, did Emma say?”
A: “She told me that Steve admitted he’d been embezzling from the bank.”
Is that hearsay?
We don’t know. If the purpose of the testimony is to establish that, sure enough, Steve was embezzling from the bank, then it’s hearsay. But if the purpose was to explain why Emma took the otherwise inexplicable step of ordering an unscheduled bank audit, it’s admissible.
Even if it’s hearsay, we must examine whether it fits in to the recognized hearsay exceptions. Note well that there’s a difference between, “It isn’t hearsay,” and “It’s hearsay, but admissible as an exception to the hearsay rules.”
So let’s imagine that we want that statement in evidence to prove that Steve was embezzling from the bank. Steve’s statement to Emma is hearsay for that purpose, but it’s admissible as an admission against Steve’s penal interest.
But Emma’s statement about Steve to the unnamed witness is ALSO hearsay, and we don’t have any reason to imagine it also fits in any exception.
Contrast that with this scenario, where Steve’s being prosecuted for killing Emma and the theory of the case includes Steve’s motive:
Q: “What, if anything, did Emma say just before she died?”
A: “She told me that Steve shot her and said now she’d never be able to tell anyone how he’d been embezzling from the bank.”
Here we have the same thing: an out-of-court statement, offered in evidence to prove that Steve was embezzling. Once again, Steve’s statement to Emma is admissible as a declaration against his penal interest. But now we can hear Emma’s statement as well, because her utterance was made under belief of impending death, and it concerned the cause or circumstances surrounding that impending death – another exception to the hearsay rule.
So this “totem pole” hearsay, or what dzero calls “second hand hearsay,” is sometimes admissble, as long as each of the combined statements conforms with an exception to the hearsay rule.