Study the writers who consistently create good dialogue. When you read or listen to the works of writers such as Aaron Sorkin, Elmore Leonard and Edward Albee, you can hear a musical quality to the dialogue. There is a rhythm to the scenes. Characters might talk over each other in a rapid-fire banter, then suddenly stop on a poignant line. Listen and study the ways certain writers capture the dialect of a particular area. David Simon captured the unique sounds of the Baltimore streets in "The Wire," just as David Chase and the other writers of "The Sopranos" did with the mafia subculture of New Jersey.
Go to a public space, such as a coffee house, and discreetly listen to other people's conversations. Study the way they treat each other, the way they use phrases. People in close relationships often develop a shorthand in conversation. One person might only use a word or some vague statement, and the other person knows exactly what she's saying. After they leave, write down what you heard.
Write down exactly what each character wants before writing a scene. Each character should sound unique because of different goals, and knowing what characters want makes it easier to come up with creative ways to have them achieve their goals. For example, if one character wants the other character to lend him money but he knows the other character probably doesn't want to give him anything, he might say something to make the other feel sorry for him. Or he might compliment him. The true goal should typically remain as subtext in the scene. Stating the goal becomes too "on the nose" and rings false.
Give your characters different statuses for the scene. This doesn't mean one has to be rich and the other poor. One just needs to have more power than the other when the scene starts. This creates an inherent conflict. For example, if a husband character has just cheated on the wife character, the wife would have more power than the husband at the start of a scene. The power dynamic might switch during the scene at some point, even if only for a brief moment -- and in fact, it typically should in order to keep the scene from feeling stale or too one-note.
Close your eyes and take a moment to hear what these two people would say to each other. Fully developed characters can be heard just as easily as you might hear your father or child. Write down what you heard and see where it takes you. This might not be the opening of the scene, but you might be able to use it later. The important thing is to try to capture what these characters truthfully sound like. Don't pass judgments if you hear them saying something awful or cruel. Just write them as you hear them, keeping in mind their desires, fears and goals as they speak.