Dialogue is one of the trickiest things to get right. It requires a good ear, and the ability to make speech sound natural even though it is probably the most carefully constructed, “artificial” component of any fictional work.
What I mean:
Counterintuitively, dialogue in fiction should not mimic everyday speech.
Humans say a lot of pointless things, and pepper their dialogue with fillers. When it comes to writing dialogue in fiction, you have to keep it more “distilled” and purposeful than in real life. It needs to carry more weight – while still sounding realistic.
One of the best ways to see if your dialogue sounds real or fake is to read it out loud, so that you can hear what your character is saying (since your readers will imagine them speaking out loud).
Cut most fillers (“ummmm”, “errrrr”, “you know”, greetings and niceties, etc.) And cut the small talk. These are rife in normal speech but will bog down your dialogue.
Cut everything that doesn’t immediately impact the scene. Anything that does not further develop your character, the plot, or any subplots should go.
Keep long speech paragraphs to a minimum. People rarely speak for a very long time uninterrupted. It might be important for your character to say something lengthy, but remember to at least split it up with body language and other means of giving your reader a break.
Dialogue can tell us in two sentences what a description would tell us in one or two paragraphs. It brings your characters to life. Remember each character needs a distinct voice. And be consistent.
Bear in mind your speaker – but also bear in mind to whom they’re speaking. That will affect what they say, and the way they say it.
And one last thing: avoid info-dumping via dialogue. Remember that your world should unfold gradually to the reader through showing, not telling. (See Quick Tips #3.)