Spoken sentences, phrases and words require double quotation marks at the beginning and end. If a person quotes another person, the quote requires single quotation marks.
"Leave me alone." Her voice sounded angry.
"When I asked Susan what was wrong, she snapped back, 'Leave me alone.'"
Writers sometimes explain who is speaking before they speak. They do so by integrating spoken dialogue into another sentence. A comma usually separates the spoken dialogue from the rest of the sentence.
Susan said, "Leave me alone."
"Leave me alone," Susan said.
In the United States, periods belong inside the end quotation mark if the sentence is ending. Otherwise, writers can place a comma in the same location and continue the rest of the sentence.
Susan said, "Leave me alone."
"Leave me alone," Susan said.
Question marks belong inside the quotation if the person speaking is asking a question. If the question mark belongs to the rest of the sentence, it belongs at the very end of the sentence, outside of the quotation marks.
I asked Susan, "What's wrong?"
Why did she snap at me when I asked her, "What's wrong?"?