Dialogue can be a bit intimidating. All that punctuation. But it’s really not that complicated. The usual practice is to put dialogue in quotes and place an attribution after it, separated with a comma inside the closing quote mark. The attribution will not be capitalized, because it’s part of the same sentence:
“Hello,” he said.
The only thing that’s a little weird is if the quote is a question, you still don’t capitalize the attribution, even though it sort of looks like you should:
“How?” he asked.
When using a character’s name, it’s best to place the name before the verb, as in
“Hello,” Mark said.
This has fallen out of style:
“Hello,” said Mark.
You can also put the attribution first:
He said, “Hello.”
That’s really about all there is to dialogue punctuation.
The other important rule is to change paragraphs each time you change speakers. This would be confusing:
“Hello,” he said. “How are you?” she asked.
But this isn’t:
“Hello,” he said.
“How are you?” she asked.