A writing mentor of mine once told me that I could write dialogue. I think it arises out of my acting training. I become the character when I'm writing (which can become difficult in any conversation where you need to switch heads!). Ray Bradbury said something similar, that writers hear voices in their heads, a condition that could easily be confused with insanity.
I've listed some tips that are useful to keep in mind.
1. I'm grateful to KM Weiland in Jane Eyre, The Writer’s Digest Annotated Classic for this basic piece of advice:
'The only dialogue that needs to be in your story, is dialogue that 1) moves the plot forward, 2) develops characters, or 3) preferably does both.'
2. 'Dialogue is not just quotation. It is grimaces, pauses, adjustments of blouse buttons, doodles on a napkin, and crossings of legs' says Jerome Stern. We can easily overlook the fact body language is a form on communication. It is linked to the next point.
3. Good dialogue is often about what is NOT being said. It's the oblique angle to a conversation, the incomplete sentence, the hint. In reality, we're often reluctant to come and say what we mean directly (unless it's an argument perhaps), therefore you can create great tension by leaving the thrust of the dialogue unspoken. The Hollywood scriptwriter, Robert Towne, famously once said, 'Good dialogue illustrates what people are not saying.'
4. Dialogue shouldn’t be realistic. It should be an illusion of realism. Realistic conversation is usually boring, it meanders, loses focus. Readers won't tolerate that!
5. Banish adverbs. Allow the reader to decide how the words are being spoken. This brings them closer to your character. Don’t tell the reader – reveal it in their actions.
6. Get the voice of each speaker clear and distinct. Use their habitual phrases, tics, vocabulary, style of speech, accent, tone etc. We need to hear them say the words. And they need their voice to be different to everyone else whose voice we're hearing. (I like to practice by writing conversations between characters as an exercise, stuff that likely won't appear in the novel, it helps you 'find' the voice though.
7. The word said is largely ignored by the reader, it’s background noise. It's better than all the synonyms that inform the reader about how the words are spoken. Let your readers decide that.
8. Dialogue shouldn’t be used for exposition. We don't go around filling in backstories for others. If you do, they are probably highly tolerant of you or fast asleep.
Let the dialogue advance plot and character. Keep it tight. Most importantly, make every word count.