Dialogue can be great at bringing the reader into the story and sharing information about a character. We can learn a lot about a character in how they speak and what they say. It can help set the mood for the story. But most of all you need to make sure that the dialogue advances the story.
You do not want to fill your pages with meaningless drivel. Such as two characters greeting each other.
“Hi, Bob. How are you doing?”
“OK. I guess.”
“Nice weather, huh?”
This exchange could easily be deleted from the scene and replaced with Sally greeted Bob. Now if you want this scene to share something about the characters, you would need to make some changes.
“Hi, Bobby. How are you doing?”
Bob continued to stare at his shoes. When he spoke it was more to them than her. “Ok. I guess.”
“Nice weather, huh?”
All she got in response was a nod. Sally shot a glance at the doctor. She didn’t know what to do. All she knew is she wanted her brother back and the boy who stood before her wasn’t him.
In this case, the dialogue is being used to show the strained relationship between Bob and Sally, which is better than just telling the reader. (Sally worried about her strained relationship with Bob. He rarely said more than a word or two to her when they saw each other.) Actually both ways (a summary or a short dialogue) would work in the story depending on how you want to portray it.
Though people actually talk with a lot of fillers (ums and pauses), most often you will want your dialogue to be crisp and filled with tension. You want to compress your dialogue, cutting fluffy words or whole lines from the exchange.
Here is an example from another website.
“Mary, are you angry with me?” John asked.
“You’re damn straight I’m mad at you,” Mary said.
“But why? You’ve got absolutely no reason to be!”
“Oh but I do, I do. And you can see it in my face, can’t you?”
“You angry with me?” John asked.
“Damn straight,” Mary said.
“You got no reason to be!”
Mary felt her hands curling into fists.
As you can see the second rendition is much tighter and increases the conflict. So go through your dialogue and compress it as much as you can. Take out the adverbs. Use sentence fragments. Cut words out ruthlessly. The dialogue will improve as will your story.