When characters talk, they don’t JUST talk. They do all sorts of other things at the same time: make breakfasts, play with puppies, infiltrate bases, or even just react to what the other person is saying.
So we usually blend dialogue with action.
“Mom, guess what?”
“What?” she gasped between sit-ups.
“I won the four-hundred-meter sprint this afternoon.”
Mom stopped mid-sit-up and turned to look at me. “You won?”
“Yep!”
You can see that action can happen while someone is speaking (she gasped between situps), or it can happen before or after someone speaks.
"And what do you know, little Gobgap?"
"One," I said, reaching into my bag of many things. "Monkeys love nuts."
The lions crept closer.
"Two..." My hand closed on the stick I’d been looking for, ready for this very situation. "Bears love honey."
The lions crept closer still, I could smell their breath, see the scraps of boy's shirt in their teeth.
"Three, lions love to eat little boys," the lion said.
“Give it back you little brat!” I yelled, lunging after my brother.
Brenton dived over the kitchen table, cackling wildly.
“Eliza’s got a boyfriend!” he chanted, turning to dangle my phone in his little snotty hands.
I swatted at it from across the table, but he pulled away and I grasped empty air.
“I’ll end you!” I cried.
True dat. Dialogue punctuation can be finicky.
Here's a handy guide (or you can just google for dialogue punctuation—everyone has the same questions!)