Inverted commas are also called quotation marks or quotes. They are used to indicate spoken words (direct speech) or quotations.
"I'd like strawberry," she said.
The spoken text goes inside the inverted commas. Note the comma before she said.
As the poet Burns said, "A man's a man for a' that".
Note the comma after said, which introduces the direct speech. The full stop goes last as it ends the whole sentence, not just the quotation.
"Stop him!" she screamed.
"I adore Burns," she said. "He's my favourite poet."
The first sentence ends with a full-stop after said. The next sentence begins with a capital letter. Since the whole of the second sentence is a quotation, the full-stop comes inside the inverted commas.
"When you're feeling depressed," she went on, "his comic poems are best."
Here the tag is in the middle of the sentence and is separated by commas.