Hearsay, in a legal forum, is an out-of-court statement which is being offered in court for the truth of what was asserted. In most courts, hearsay evidence is inadmissible (the "hearsay evidence rule") unless an exception to the hearsay rule applies.
For example, to prove that Tom was in town, a witness testifies, "Susan told me that Tom was in town." Because the witness's evidence relies on an out-of-court statement that Susan made, if Susan is unavailable for cross-examination, the answer is hearsay. A justification for the objection is that the person who made the statement is not in court and thus not available for cross-examination. Note, however, that if the matter at hand is not the truth of the assertion about Tom being in town but the fact that Susan said the specific words, it may be acceptable. For example, it would be acceptable to ask a witness what Susan told them about Tom in a defamation case against Susan. Now the witness is asked about the opposing party's statement that constitutes a verbal act.