The biggest mistake when writing dialogue is to use dialogue solely as a way to provide information to the audience. This typically creates stilted, artificial dialogue that serves no purpose to the characters, but simply provides exposition to the audience.
Don’t do that. Instead, think of all dialogue as a form of conflict. First, think of how characters physically fight either by hitting or kicking each other, or by trying to shoot each other. Fight scenes are interesting because each side is trying to get something but the other side is in the way. People watch fight scenes just to see who will win.
That’s exactly the same idea you need when writing dialogue. Dialogue is nothing more than a form of fighting without physically punching or shooting each other. In a well crafted scene, one character wants something while another character gets in the way. Now the dialogue is a battle between characters to see who will win.
Think of the bar scene in “Star Wars” when Obi-wan first talks to Hans Solo. Obi-wan wants to hire a pilot who has a starship but Hans Solo needs money. Hans is initially suspicious of Obi-wan until Obi-wan mentions how much he can pay when they safely arrive. That’s when Obi-wan finally wins over Hans and the scene is over.
The next scene occurs when Hans is trying to leave the bar when Greedo, the alien bounty hunter stops him. Now the conflict is that Hans wants to escape but Greedo wants to keep Hans captive. So the dialogue starts off with Hans trying to talk his way out but that talk is to give him time to fire at Greedo first.
Notice that the dialogue is always geared towards one character opposing another and trying to get what they want through persuasion, coercion, or outright threats. Dialogue is always about fighting with words.
Once you realize that dialogue is meant to achieve a goal and overcome another character, then you write scenes where the dialogue is far more interesting than just an information dump. Dialogue is a verbal way of fighting. Since fighting is inherently interesting, dialogue that involves striving for a goal will also be interesting.
When you can write interesting dialogue, you go a long way to writing an interesting scene. Dialogue alone won’t make your screenplay great, but when you use dialogue as a way for characters to fight each other, then you’ll go a long way towards writing more engaging scenes than before.