I think we all remember this one from school: when you introduce a quote in the middle or at the end a sentence, put a comma before the open quotation marks. This holds true whatever you’re quoting, whether it was written or spoken:
The newspaper’s food critic commented, “This new locally owned fast-food restaurant beats all the national chains hands down.”
Amy asked, “Are those chicken nuggets spicy?”
But if you introduce the quotation with that, whether, or a similar word, you don’t need the comma:
I assured her that “they’re not spicy at all.”
When the quote begins the sentence, place a comma at the end of the quoted part, just before the close quotation marks—unless the quotation needs a question mark or exclamation point:
“That was a good burger,” said Mark.
“I thought it was great!” exclaimed Dave.