We have an excellent punctuation system in English to indicate when someone is speaking, which isn’t true for all languages. Russian, for instance, can sometimes be clumsy and confusing when indicating direct speech. Regardless of how it is indicated on the page, the real trick is to figure out what someone says. One thing I’ve learned from years of trying to do this, as well as listening closely when people talk, is that when you write dialogue, it cannot be done the way people really talk.
The reason is because in speech we use several forms of communication, which all work together, whereas on paper, there is only one form of communication. In written dialogue there are no facial expressions, no body language and gestures, and no range of tones of voice, though we have a faint imitation of tones with a few things like italics.
From a real conversation, the spoken words might not even make sense if someone saw them written down, since the other communication elements would be missing.
By contrast—and a common problem with inexperienced writers—if a character speaks in a way that looks good on paper, with nice grammar in full sentences and everything said fluently (and with no contractions), it is usually going to be unrealistic (and therefore bad) dialogue. People don’t talk that way.
Good dialogue is an illusion. It cannot literally imitate the way speech sounds, as that would occasionally be incomprehensible, but it must create the impression of sounding real.
One principle writers ought to keep in mind that it is very very rare for one person to talk and talk and talk with no interruption from anyone else. In some books, especially some 19th century novels, even good novels, a character may go on for a solid page or more, with long complicated discourse, presumably with other characters just sitting there listening. From the point of view of realistic dialogue, that is a flaw of those novels.
Natural conversations consist sometimes of starts and stops as people try to gather their thoughts, or change what they want to say, or get distracted. This can be imitated by having a character stop speaking, or even change what they were saying. We can also create different emotional and plot effects with different kinds of punctuation. (1) A character can stop suddenly, and a bit dramatically, with a dash: “But I was—” She stared at the person who had just walked in. (2) Or the character may drift off slowly and quit speaking with an ellipsis: “No one came to see me when…” He sighed and looked up.
People will also sometimes interrupt one another (the dash is useful there), so that the conversation will change directions or must be pulled back on track. Throwing in bits of the other elements of communication can also be useful or interesting, so that someone frowns or looks puzzled, leans forward, turns away, waves both hands at once, or uses one finger to draw shapes in the air. These also help create the illusion of reality, but the writer has to use these things sparingly or else the dialogue bogs down and stops.
Another basic principle of real speech is that people have different “voices”, in terms of vocabulary, sentence structure, boldness or reticence of speech, colorfulness or drabness, and so on. These elements can be exaggerated and become clumsy, but a skilled writer can help distinguish the characters with differences in their speech, and such differences help with character development.
One of the real tricks in writing dialogue is that just like the rest of the prose, it should have a purpose to convey some particular information to the reader, either providing plot information or saying something about the personality of the character. In fulfilling that purpose, however, the dialogue must still sound natural. Nevertheless, it isn’t rare to find that a writer will have a character say something because the writer wants the reader to know it, not because the character would actually say it.
Another way that writers might want to create an illusion of real conversation is to make sure that what they write is interesting. Many real conversations are both dull and stupid.
I’ll give you a chance to judge something I’ve written recently, in (yet another) revision of Benedict and Miramar. The two main characters speak, beginning with Miramar:
“Really?” Her eyes grew wider with enthusiasm and surprise. A light of hope began to play on her face. “You think we could try it?”
“I don’t know. I can’t definitely say I’m willing to do that. I’m just thinking about it. Maybe we should see how fate guides us.”
“Fate is guiding me to go,” she replied.
“I don’t think fate guides you at all. It just gets tired of keeping up with you.”