Continuing my series of posts based off of David Madden's essential Revising Fiction:
99. Have you failed to make dialog perform secondary functions?
A lot of beginning writers see dialogue as a way of advancing the plot. Most of the plot will come out through it, and in lesser fiction, characters will contribute things they already know and/or would have no reason to share with someone else because the author needs to get this out for the reader. Dialogue can and should advance the plot - in a play it's often the only means - but dialogue can also convey other functions as well.
Dialogue is a incredibly effective means of conveying character. Done correctly, a character may reveal any or all of the following through dialogue:
Most of this should come subtly. You don't want to have a character announce any of these things (typically). A highly educated person will sound different from someone without an education. One or both of those people may have a bias against the other; this will come out in their interaction, even if they don't openly express it. The highly educated person may be condescending, or we may see he/she is talking circles around the non-educated person in a way that person is not aware of.
Dialogue should also say what the person isn't saying. People often talk around subjects that are painful or distressing to think about. Yet these things inform their conversations and behavior; imagine a married couple deciding which tree to buy for Christmas. The wife has had an affair. They've reconciled but the fault lines are still there. The husband wants the tree. She seems disinterested. They argue over which one to pick. Are they arguing about the tree? The affair?
Try writing this scenario out as an exercise yourself.