I'm having difficulties in writing conversations between characters, especially if they are many of them. How can I write good dialogue?
I think there are two prerequisites for good dialog
First the scene needs to have tension: conflict, high stakes, imminent loss, et cetera. That is why you've chosen to write that moment of the story in real-time rather than present it as a summary through narrative or character reminiscence. This means you (author) know the stakes for each of the major characters in the scene and know how those characters are at odds which each other. A scene where everyone agrees isn't something that needs to be shown in real-time, nor does a scene where one character is educating other characters and they all accept what they are being told without objection.
A second prerequisite for good dialog is that you (the author) have defined for yourself unique character traits for the major characters in the scene. You know who is argumentative and who is shy and who is unprincipled and who is very conscientious, et cetera.
A) When your characters are talking they want something for themselves: share information, sell information, a drink of water, help, shift blame, or take credit. How they go about negotiating what they want will be a function of that character's nature -- trusting or naive or blunt characters will just blurt it out while crafty and manipulative characters might be talk in circumlocutions
B) Great dialog is more similar to the best of conversation than a realistic conversation. If your dialog sounds like a conversation you've had with your friends, then is maybe very natural but it is likely boring. Dialog is a tool to reinforce the tension of the moment. Remember your own conversations when you were mad or very happy. Most likely you and whomever you conversed with talked past each other. You (or someone) tossed in insulting or hilarious phrases that caused the discourse to jump ahead or skip to a new subject.
Hi, how are you?
I'm fine. How's your mom?
Hi, how are you?
What do you mean by that!!! or Don't pretend you care, I know you murdered my mother.
Unexpected direction. Stakes are laid out. Pushes reader to speculate on what is happening and what happened in the past. When we hear a couple arguing, we pretend to not to notice, but we always try to hear what they are saying. We are drawn to conflict and intensity. It piques our curiosity.
What I've found in my writing is that when I dialog isn't working. It is because I made it too transactional -- hihowareya. Or, I've chosen the wrong moment in my story to show in real-time; that it doesn't embody the tension needed to make a great scene with dialog.
EDL is largely correct. The general way to do good dialogue is to firstly ensure it's exploring or furthering something important (moving the plot along, introducing character conflicts, exploring/testing characters) and make it realistic/organic, but with much of the repetition, ums, ahs, and circular discussions cut out. It needs to be a heightened, more efficient rendition of realism if done correctly.