I'm an amateur writer. I'm having problems with dialogue writing specifically with punctuation and capitalization. Also, I need some advice on how to avoid word repetition. Please help this new guy out.
"Well," she said, wondering where to begin, "you might want to consider checking out Pintrest. They have wonderful little posts talking about stuff like this."
As for word repetition? You should try to avoid it in general terms, but it's also a useful tool to offer something weight.
Let's set the scene. Our intrepid hero just went through the whole story, he's defeated all the minions in the villain's lair, and now only has to face the villain. Here's the thing. It's gone from a power fantasy, to a Greek tragedy.
"This can't be." His words were barely more than a whispered refusal, a glimpse into the rapidly fracturing mind that cannot process where he finds himself. "This... this can't..." He'd done everything right.
And yet he stood over his brother's little body. His chest no longer rose. His already pale skin grayed before his eyes. He'd done everything right.
The hero of the people, they'd called him. The rescuer of the masses. He'd done everything right. He brought hundreds home to their families, saved them all from the tyrant.
All he could see, was the look of sheer terror frozen onto that face. All he could process was the soundless scream. And the tense, lifeless laughter that seemed to rumble in his chest.
He'd done everything right, and he lost it all. He was a good person, and he'd lost it all.
Maybe... maybe he'd get it back if... if he wasn't so good.
Repetition can be a powerful tool, to show just where your character is. But you need to consider when it needs to be used, and use it sparingly. Hope this helps.
To learn punctuation and capitalization, get your hands on a style guide appropriate for your language (or region or company). I have the Chicago Manual of Style and the AP Manual. Also, read a lot. Works published by reputable publishers will (usually) be proofread closely and reflect the punctuation and capitalization standards of their language.
Don't worry about repetition. Repetition is not a sin. Just write your piece then read it aloud. Listen to where the repetitive bits sound weird and fix those.
For punctuation and capitalization:
The easiest thing to do is open a best selling book of fiction, published by a well known author, and look at their dialogue. Pay attention to the details, when commas are used and periods are used, whether quote marks appear before or after punctuation, etc. Where the attributions of who is speaking are (front, middle, trailing).
Joe asked, "What was the point?"
"Wait," Mary said. "What was the point?"
"What was the point?" Joe asked.
Often there is no attribution, if the reader knows who is talking by the context (usually a two-person conversation). When there are more than two people talking, attributions are usually necessary (and more often fronting) so the reader can keep things straight.
Avoiding word repetition:
Depends on what you mean. Embrace the simple words "said" and "asked", at times "shouted" or "yelled". As you will see in published fiction by expert authors, they are used constantly and almost never noticed by readers; don't consult a thesaurus for other ways to say "said".
Although as @Faythe85 says repetition can occasionally serve as emphasis, in general you can consult a thesaurus, there are many online. But the point should not be so much to avoid repetition, it should be to find the word that most accurately represents the idea you are trying to convey. If you do that, you will find repetition goes away automatically.
If it doesn't, if the same word really is always the most accurate, you should be looking instead at if you are being repetitive. Many beginning writers read their work and don't think they have emphasized some point enough, so they try to add emphasis by writing it again in other words, and again in yet more other words. Limit yourself to making a point ONE time, and if the sentence doing that isn't strong ... find a stronger sentence (or reaction or feeling) that better portrays the importance of this point. The acronym for this is DRY, "Don't Repeat Yourself". Especially close together (in the same scene), but also throughout the book: You don't need to tell us Joe is seven feet tall more than once, you don't need to tell us Michael doesn't know how to spell his own name more than once. You don't need to describe Lisa's magically glowing sword every time she (and only she) draws it.
Understand your instinct to repeat an idea is your intuition that the first sentence is weak and did not do a great job. Either mollify yourself that you've made it as good as you can, or rewrite it to be stronger.
Per the mechanical bits, how to format punctuation and the like, get yourself examples and read them. Pay attention to, and then write notes regarding, how they're written. Formatting is important but you gotta have something to format, so...
Repetition? If you mean the same words over and over again, or the dreaded stank of a script where four wildly differently described characters speak in exactly the same vocabulary and style, that's just garbage writing. This could be considered creepy, but if in a public space and you're not doing anything pervy with the output, what I'm trying to say is record people in their natural habitat with a concealed sound recorder. Go back to the laboratory and transcribe it. Take note of the words that each person uses that mean the same thing. You say potato, well guess what Poindexter, I say tuber. Spuddenly your writing has a lot more variety to it and you're paying attention to the mechanics and syntax different people use.
Try to have fun with it, don't get too serious, and be creative (or quit).