Dialogue is the best tool at a writer’s disposal. More can be shown through dialogue as opposed to telling through narrative summary. There’s less work for the writer if the characters tell the story or share the exposition. Showing versus telling through dialogue is also important when conveying character emotion. The characters should tell the reader how they feel instead of the writer telling the reader about the characters. There is also some freedom when writing dialogue. Characters can use informal idioms pronounce things incorrectly so long as it fits with their character.
The narrative around the dialogue is as important as the dialogue itself. When detailing which character said what, it’s important not to describe any feelings. Search for -ly adverbs describing emotions and remove them. Don’t tell the reader “He said angrily.” Show the reader the character is angry with what they say in their dialogue. Remember to read aloud the dialogue. Sometimes reading dialogue sounds different than saying dialogue. If dialogue doesn’t sound natural or realistic, the reader will notice. Most people don’t use big words when they speak. Unless it fits with that character, keep the words simple. Use ‘think’ instead of ‘conclude’ or ‘get’ instead of ‘retrieve.’
Speaker attributions can be tricky business for some writers. They’re important so the reader knows who’s speaking. Some writers will use words like grunted, spat, exclaimed, blurted, retorted. They may think they’re giving their writing more flare, but people don’t often grunt words. And if they do, they’re intelligible. Stick with said. If the dialogue ends with a question mark, everyone knows it’s a question so why follow it with ‘she asked?’ One thing that helps me is having only two people speaking at a time. It’s easier to go back and forth instead of bouncing all over the place. And always put the name or pronoun first in the speaker attribution. ‘He said’ sounds more professional than ‘said he.’
The best place to learn how to improve one’s writing is with Renni Browne and Dave King’s “Self-Editing for Fiction Writers: How to Edit Yourself into Print.” If I were teaching a class on fiction writing, this is the book I would use as the course textbook.