When a character is relaying another character’s direct words, you’ll have a quotation within the line of dialogue, which already has quotation marks. As a result, you would use double quotation marks as you normally would—around the entire line of dialogue—and use single quotation marks for the words the speaker is quoting.
Let’s say Fred said, “I can’t keep it together anymore.” And let’s say Mary wants to repeat these exact words to a friend. That would look like this:
“I’m not sure what to do. I heard Fred say, ‘I can’t keep it together anymore.’”
Notice how the entire dialogue appears in double quotation marks and just Fred’s words appear in single quotation marks. This makes the end of the dialogue look a bit strange—there’s a single quotation mark followed immediately by a double quotation mark—but that’s how it works.
You can also have a character summarize what another character said. That might go like this:
“I’m not sure what to do. I heard Fred saying he’s not keeping it together anymore.”