Every sentence ends in a punctuation mark. Here are the basics.
The Comma: Generally in dialogue, there should be a "," at the end inside the quotation marks. This is the case in just about every situation. Here are some examples:
"That store sells candy," she said with a grin.
"I really hate school," Jake muttered.
"Pokémon training looks like fun," the old man commented.
Notice also how the first word after the dialogue isn't capitalized. That's because it's like each line is one sentence; ignore the quotation marks for a moment. It doesn't really make sense if you just say "I really hate school." and "Jake muttered." as two different sentences, because they don't really make a lot of sense if they're alone. They only make sense when they’re connected, because they rely on one another for clarity.
Another time you use a comma is if someone is being addressed. That means if one character is talking to another character, there should be a comma before or after their name (depending). Examples:
"Hello, Jake," said Robert.
"Here, Jackie, I wanted to give this to you," Alex said shyly as he gave her a pretty rose.
"Rebecca, do you like chocolate?" her grandmother asked.
The Period: This goes at the end of every sentence. However, if you have dialogue and you want to start a new sentence after the dialogue, you can put a period inside the quotation marks. This means that each sentence can stand alone and would still make sense without the other. Remember to capitalize the next word! Example:
"You’re pretty." She smiled up at the supermodel.
"I hate you." The little girl crossed her arms and walked away.
"I wish I could become a Pokémon trainer." His mind filled with possibilities at the very thought of it.
"Yes, I would like a piece of cake, please." Without even waiting his turn, little Johnny plunged his hand into the birthday cake and grabbed some for himself.
The Question Mark: Whenever somebody asks a question, put a "?" at the end of the sentence. It is not replacing a period here, so the word after the dialogue wouldn't be capitalized. Example:
"Is it going to rain today?" the boy asked.
"Can I have a blue one?" she requested of the balloon salesman.
"Do you like ice cream? My family really likes ice cream," Sonia said happily.
The Exclamation Mark: Put a "!" at the end of a sentence when somebody has shouted something, or possibly given a strict command. Again, if it's at the end of dialogue, the word after the quotation marks usually shouldn't be capitalized. Example:
"I want a pony!" the little girl screamed.
"Go to your room, Jessie! You were a very bad boy," the mother said angrily.
"Let's go to the carnival!" he cried giddily.