Dialogue is another part of developing the character often forgotten by authors. The trick is to know the character and their background and thinking about these as the dialogue is designed. Each character has a particular background and this will be reflected in their speech. When I start a rough draft of a story, often I'm just putting words, even the dialogue on paper to reach the end of the draft. As I rewrite and revise dialogue is something that comes into play.
The first is to listen to the characters voices. Do they all sound the same? Could their words be spoken by any other character in the story? To differentiate can be difficult. So I must consider the character's background. To have a slum character speak with precise English makes the reader stop and wonder. Does the writer have a reason for this. If so the writer must make sure this is clear.
People's professions often color their language. Cops use specific words not used by other people. So do doctors, lawyers and other professions. These words can slip into their conversation. The writer can use these words to further develop their characters and to differentiate them from the other characters.
What is the character's nature. A shy person speaks differently from a bold one. A mother speaks to her child in one way and to her husband or another adult in another way.
So when developing the dialogue think of the ways this person can speak differently that the other characters in the story. Try reading just the dialogue aloud like one would in a play. Often this helps make the characters sound different and brings them to life.