I’m going to be brief here because I believe getting a sense of dialogue best comes from taking a screenwriting class or reading a book on screenwriting if that fails. (I also make some these points elsewhere)
In a movie, dialogue needs to further the plot, reveal character, create conflict and illicit emotion with every sentence. You need to learn to apply as much as that as possible to what your characters sound like.
Dialogue should never be written to echo how we really talk. Too many ums, ahs, “you know”s, junky slang words, run on sentences and tangents would ruin a movie and they will ruin your book.
Tangents can be good, like using them as a hint of exposition, but they need to be short and flow so smoothly into the conversation the reader doesn’t notice the shift. You are bending a rule when you use them.
For the most, part conversations should be crisp, clean and do almost everything you see in the movies. Novels can get away with dialogue that does not create conflict so long as it reveals character. It’s a good way to have occasional down time.
You can have dialogue that simply builds tension or a relationship. And you can use dialogue as a transition. And you will see such concepts used in TV shows as well. But the general theory is the same. Keep it meaningful.
The only other advice I consider important to impart is the need for your characters to all have their own voices. Each character will have a style of speaking that is unique to him, learn it, use it, and be consistent.
Now if a character is being deceptive that vocal style can change. It’s a good nuance to work in and I highly recommend poking around some communication books to see what kind of linguistic patterns people in different situations have.
If you are struggling with the words the character says, try watching movies, listening to radio plays, and watching quality TV. (I recommend supernatural) It is important to hear language used when trying to figure out that aspect of a book. Reading about it won’t get you are far as you can get with audio stimuli.
If you have the opportunity to talk to people from many walks of life that is also a great way to pick up on how certain kinds of people say what they say. But that approach has its limits and its downsides as you can imagine.
Once you have internalized the process, (usually after a garbage phase) the characters will become much more clear. Who knows, maybe the book will be easier to write. I doubt it, but anything is possible.