It goes at the end of the sentence, inside the quotation marks, for declarative statements.
What is a comma?
When an action is being done to the subject.
What is passive voice?
Necessary when a different character starts speaking.
What is a line break / new line?
Commonly used to tell the reader who is talking and in what manner they are doing so.
What is a speaker tag?
This creates the author's individual style through how the story is technically written.
What is diction / word choice?
Signifies the start of a paragraph.
What is an indentation?
Can be at the end of speech instead of a comma in certain situations.
What are exclamation or question marks?
How a story is laid out to tell the narrative the author is intending to.
What is story structure?
These can be broken intentionally, if you know them.
What are grammar rules?