As with character, so with dialogue — it is not actual speech.  You edit out the nonessentials — the you knows, the likes, the ers and ums.

It’s also not a matter of lengthy set piece speeches — convert lengthy stuff to indirect dialogue (ie, narrative paraphrasing).  Especially if you want to convey something about the character that he would not blurt out about himself.  When a character can’t say what he wants to say, you’ve got a nice bit of conflictedness.

Cut away from the dialogue to show detail of action, setting, character.

Stylize your characters’ ways of speaking — a character may speak in short bursts, or may repeat certain catch phrases, or use fanciful constructions, or rhetorical questions — you pick what fits the character.

Dialogue is always part of a scene, and what is at the heart of every scene?  Conflict.  Every dialogue is a conflict, overt or subtle, inner or outer.

Dialogue tags —

Simple:  he said, she asked, he told her, she wanted to know.  Don’t use grumbled, hissed, stated, expostulated, purred.

Adverbial — he said, sadly.  Don’t do this.  The emotional tone of the line should be clear from the words themselves and the situation of the characters.

Accompanying action — “Give me that,” he said, his hand closing around the barrel of the gun.

Cueing action.  She closed her eyes, and said, “I can’t bear this.”

Contradicting action.  “You want a drink?” he said, but he didn’t move the bottle more than an inch toward me.

“I’m glad to see you,” I lied.