Don't Use Names Too Often
Think about it. When you're talking to someone, how often do you use their name? Sure, when you're calling them or are emphasising something, or maybe expressing frustration or warning, but in general conversation...? Listen to people around you, and see how many times names are mentioned.
This was one of my biggest issues when I first started writing. It made complete and obvious sense to me once I was told, and has now become one of the biggest indicators of immature writing for me.
Take a look at what you've written. Examine every name that appears within dialogue and ask yourself, "Is this really necessary? Can I take it out without altering the sense or meaning of the sentences?" If the answer is "yes" then take it out.
One of the most common errors is starting dialogue with the name of the person you're speaking to.
"Billy, I just wanted to tell you...." Or "I just want to tell you, Billy...." The context should make it perfectly clear who you're speaking to,
Use Language That Fits The Character
Don't have a sixteen-year-old talking like your Great Aunt Lucy, or vice versa. Teenagers rarely speak in complete sentences, let alone use proper grammar. Let yourself go. Forget everything you learned about how to write "correctly". All the rules go out of the window when you're writing dialogue. "I do speak more proper than what you do," she said. "Innit, mun," he replied. "Fuck yeah."
There are certain words that young people just don't use, and if you're looking for authenticity you need to avoid them. One that I've pulled my co writer up on more than once is "atop". There is no way you'll find your run-of-the-mill teenager saying. "I fell ,and landed atop him." More likely. "It was funny as fuck. I tripped over nothing and landed on Johnny so hard his eyes popped out." "More like my lunch, arsehole."
It's all about authenticity. The same thing applies the other way around. If you have an elderly character or one who is particularly formal or aristocratic, you have to use words and structures they would use.
For example, someone who was young in the sixties might still be using words like "groovy" or "far out". Someone brought up in the eighties might rave about something that is "choice" or "phat" (I got quite depressed reading the list of words from 70's and 80's no longer used because they take up most of my vocabulary.
For someone extremely formal, consider taking out contractions. "Indeed, I am certain he is entirely correct in his assumption that it was an entirely unsatisfactory conclusion" For ideas, you might read the classics such as Jane Eyre, Wuthering Heights, Dickens, Thomas Hardy.
Following on from using the correct level of formality, is using the correct dialect. If you write a character who comes from Scotland, they are extremely unlikely to use American words such as trashcan, trunk(of a car), even parking lot and they definitely won't say elevator. Yes, is usually Aye, or Och Aye. No is Nae or Na. It's also good to sprinkle a few classic phrases like "Bonnie wee bairns", "Sweet little children". Bonnie lass", "Pretty Girl etc.
Another idea is to find some classic phrases in general use. For example, many British dialects, especially working class ones, use "like" a lot. "That's the thing, like. It's like not what you fink, like, izzit." In Ireland it's "hi" "Sure an, dat's the t'ing, hi. It's not what ye t'ink" In Welsh it's "mun" or "butt" "That's the thing, mun. It's nor worr ewe think, izzit."" "That's the thing, butt. It's nor worr ewe think, izzit." As you can see, the English like this most.
Another thing to consider, is how much dialect do you put in there. Not enough and it doesn't distinguish the character or "sound" the accent, that is, when the reader reads, they "hear" the dialogue as the character speaks it. Too much and the reader just can't understand, in the same way as many people fail to understand when someone with a thick accent speaks.
In my opinion, the key is first to be consistent, and secondly to pick out certain characteristics and repeat them. For example, Celtic people such as Scottish, Irish and Welsh tend to add "be" to words and phrases (I'm sure it has something to do with tenses but that's not my strong point) such as
"I won't have it." is "I won't be having that." "I'm off." is "I'll be off then." "I'm going." is "I'll be going now." Oh, and that reminds me. Quite often words and phrases don't mean quite the same as you're used to. A great example is the Welsh "now". "I'll be there now," can mean anything from, "I'll be right there," to "I'll be there when I'm damn ready and you can bet it isn't going to be in the next five minutes." "Now in a minute," is even worse. Yes, we do say "I'll be there now, in a minute." and the only thing you can be sure of is that we definitely won't be there in literally one minute, or anywhere close.
Don't forget, there are no Moms. In England, they can be anything from Mum, to Mummy, to Mother. In Scotland, Ireland and Wales they're Mam, or Mammy, or Ma. To make it even more difficult, in some English dialects they can be Mam or Our Mam. She can also be known as "The Old Girl", which can also be used for a wife.
My best advice is to find a television program or film, or look up a video on you tube, of a native speaker, or at the very least look up a list of slang words and make sure to sprinkle some in. It would be better though, to look at the construction of the language. The same goes for young people, who often have a construction, or deconstruction of their own.
The greatest danger is falling too deep down the rabbit hole and making your character sound like a stereotype or a strange mix between similar dialects. For example, a Glasgow accent is different to an Edinburgh one. A north Welsh accent is different from a south Welsh. A London accent is different from a south London accent, an east end (of London) accent etc.
My current Irish character is giving me a hernia trying not to tie myself in knots and I've decided to give up trying to work out if something is Belfast or Dublin and just let him run roughshod over them all, which is what Connor does anyway.
This comes on the tails of the accent and fits in with the general context of the story, and the formality with which the character does, or does not speak. If you're writing a character or an area, particularly if it's a country you're not familiar with, it's worth doing a bit of research into the culture of the place of origin.
For example, a vast number of words and phrases from Scottish, Welsh or Irish will either relate to being drunk, giving someone a good seeing to (beating or sex), being hungry or sarcastic. If you're writing a Celtic character and they're not being rude, lude, violent, sarcastic or drunk you're doing something wrong. Also, we navigate by means of pubs and churches.
As a more sensible example, a young person from the Welsh Valleys, or from rural areas, would never go clubbing, unless they travelled for it, bearing in mind public transport is crap. If you're in the Welsh Valleys you'd pretty much have to go to either Cardiff or Swansea to find a decent nightclub. In addition, there is only one train line with trains every half hour that stop at eleven o'clock. The busses stop even earlier. For more rural areas it would be even more difficult. The culture is based more around pubs and clubs (Very different from nightclubs. Usually working man's clubs or political clubs eg Ton Labour Club or Aber Con club).
I'm quite sure that everything I've said about writing British dialogue relates to different areas of the US and other countries, too, which is why I would never attempt to write a character who is not British. I've yet to write a truely authentic Welsh character because it would do ewer head right in, wouldn't it, mun.
I hope this has given you something to think about. If I've got anything wrong or there's anything you'd like to add feel free to do so in the comments.