When a character is quoting someone else in dialogue, use quotation marks for the character's spoken words—as you normally would—and single quotation marks to indicate the other person's words.
Let's say Gillian is going through a rough patch at work. She talked this over with her friend, Mark, and something he said really resonated for her: “Just get yourself to tomorrow." It's so comforting that she repeats it over and over when she's particularly stressed. Gillian wants to share this with her co-worker. Here's how that line of dialogue would look
“Mark's mantra is the only thing keeping me sane. He said, 'Just get yourself to tomorrow.'"
The use of single quotation marks helps to clarify what words, exactly, are attributed to Mark. It might look weird—especially when the single quotation mark is immediately followed by the regular quotation mark at the end of the line of dialogue—but that's the way to do it.