There are a lot of elements that separate a good story from a great story. One of those is in the dialogue. For most new writers this can be the most difficult thing. Not because they can't write, but because they don't make it sound realistic. Here are a few things to consider when writing dialogue for your stories.
Talk to your character
It might sound silly but have an actual conversation with your character the way you would with anyone around you. Get a feel for your characters personality. If your character is a steel worker, he's probably not going to use big words that need a dictionary to understand. If your character is someone from a different era, make sure to do a little research about the way they spoke in those days.
Listen to other conversations
Now this isn't saying you should ease drop on other people, but get a feel for the way people use their words. Listen for the differences in their tones, the way the words coincide with their moods. Let their words shape your dialogue for whatever character you're trying to portray. You don't have to use their conversations word for word, but let it be a guide for the way your character expresses themselves.
Don't stereotype your characters
If you're creating a character that is from the South, don't immediately set them up as a hillbilly. Give their words as much depth as you would if your character was someone from New York or California. Just because your character has an English accent doesn't mean they have to be royalty or even proper. Your characters should reflect the person you want them to be, but they don't have to fit into a specific stereotype.
Show the emotion
Allow your characters to show their emotions in their words. If your character is in love, let that flow in their dialogue. If they're angry or depressed, allow that to come through in the things that they say. But remember to make it believable. Just because your character is in love, doesn't mean they have to be sappy. Write the words as you would say them, not the way you think others want to read them.
Almost all fictional stories are driven by the dialogue of the characters. The right words can make or break a good story. If it's done right, good dialogue can turn a good story into a great read.