I can speak to writing interesting dialogue. In my personal opinion, there are two main rules to follow when trying to make dialogue interesting.
First, dialogue needs to sound like part of an actual conversation that could happen. I replay every dialogue scene over and over in my head and sometimes physically act it out, just so that I know it sounds like something real people would say. It's time-consuming, but worth it.
The second rule may not apply as much to you, since you are writing a visual novel, but in a regular novel you need a lot more than just back and forth or "he said, she said." One of the easiest tricks is having characters doing things while talking, but you can also describe facial expression and body language, set the tone by describing the setting, or use something about the surroundings to reflect the mood of the characters. Avoiding "Talking Head Syndrome" is hard to do, but also very important in keeping the interest of readers.
As for ending it, there are a lot of reasons that conversations can end. For example, the characters could be interrupted, or it could just awkwardly peter out like a real conversation. Like @MuffinMusing said, just make sure you have a clear goal for what you want to happen in the conversation, and why it is happening.