Writing dialogue — realistic dialogue, anyway — does not come easily to everyone. Done well, dialogue advances the story and fleshes out the characters while providing a break from straight exposition.
However, just as realistic dialogue is one of the most powerful tools at a writer's disposal, nothing pulls the reader out of a story faster than bad dialogue. It takes time to develop a good ear, but noting these simple rules and obvious pitfalls can make a huge difference.
But dialogue should read like real speech. How do you accomplish that? Alfred Hitchcock said that a good story was "life, with the dull parts taken out." This very much applies to dialogue. A transcription of a conversation would be completely boring to read. Edit out the filler words and unessential dialogue — that is, the dialogue that doesn't contribute to the plot in some way.
Veering too much beyond "he said/she said" only draws attention to the tags — and you want the reader's attention centered on your brilliant dialogue, not your ability to think of synonyms for "said."
7. Read Widely.Pay attention to why things work or don't work. Where are you taken out of the story's action? Where did you stop believing in a character? Or, alternatively, when did the character really jump off the page, and how did dialogue help accomplish that? You can start reading like a writer with the link above, or pick up an anthology and start your own list of writers to learn from.
The rules for punctuating dialogue can be confusing: many writers need help getting them right in the beginning. Take some time to learn the basics. A reader should get lost in your prose — not feel lost trying to follow your dialogue.