Be nosy. Listen in to other people’s conversations and make a note of how they speak. You’ll notice elements like contractions (hasn’t, didn’t etc.), figures of speech and turn taking that occur in natural speech.
Read your dialogue out loud. This really helps to make sure that it sounds natural rather than forced and contrived.
Don’t be too natural though! Your reader doesn’t want to hear all the repetitions and pauses that go along with actual speech. Cut these bits out and get rid of anything that doesn’t add to the plot.
Don’t use a variety of dialogue tags. ‘Chuckled’, ‘proclaimed’, ‘bellowed’ etc. just sound as though you’re desperately trying to think of a different word to ‘said’ or asked’. Which you probably are.
Avoid exposition. Although dialogue can be used to reveal information and move the plot along, don’t fall into the trap of having your characters discussing things they already know. Be very careful to ensure that readers do not feel that dialogue is being used simply to let them (the reader) know certain facts. Let the reader ascertain things from what your character is saying. Trust your reader – don’t force feed them details.
Read. Anyone who is serious about writing needs to read. A lot. And reading someone else’s work can help a great deal when it comes to writing dialogue. When you come across dialogue that works really well, work out how the writer did that. And when dialogue doesn’t work, again, work out what went wrong. You’ll then know what to do and what not to do when it comes to your own work.