When your characters start talking, that means that you're writing Dialogue. For colloquial use, that word just means that someone on the page is talking. When you're "writing dialogue" for a character, you're writing the words that character says that go into quotes.
The denotative meaning (the dictionary definition) of "dialogue" means that specifically two characters are speaking to one another. As opposed to a "monologue," which is just one character speaking, either to himself, to a gagged superhero, or to no one in particular. This is why the "Socratic Dialogues" are a thing - because the main character Socrates is speaking with another person, and both characters have input on the conversation. Also why "Shakespearean Monologues" are common, because a character would be alone on stage and wax poetic to the audience about girls that dress up as men to avoid trouble and find it anyway.
Now, because Dialogue and Monologue are functionally the same, I've decided to go ahead and cover them both in the same article for the sake of simplicity. For writers, there are some key concepts we need to keep in mind when writing spoken lines for our characters.
It's very easy to write "correct English" when you're putting things down on paper or typing them up for a story, even though that's not the way we talk. You see a character walk into the scene to confront the baddie who's dangling a damsel over a pit of snakes and you read that he shouts, "Do not harm that female, because I am angry and you will not enjoy the consequences!"
Meanwhile, the damsel and villain are exchanging a glance and wondering who replaced your hero with a robot.
On the other hand, it's easy to slide too far on the scale and end up with a set of characters who speak like they're texting to each other. "What you doing?" "Nothin much." "Gonna go out tonite?" "Ye."
Just typing that made me cringe. Give me a moment while I go wash my hands.
Most people at least occasionally complete their sentences, and while they might not be always grammatically correct when they speak aloud, they're understandable. Most of the time.
In short: Read your dialogue aloud, whether your character is speaking or thinking it. You'll find where it sounds awkward.
Remember who your character is speaking to. It's not always obvious, but you will find if you listen to folk that they will speak differently when they're talking to different people. The tech support rep on the other end of the phone line is spoken to differently than the mayor who drops by the Memorial Day Service. The kindly cashier will probably be spoken to differently than the short-tempered supervisor. You get the idea.
Monologues and Dialogues are functionally the same, but your character will treat them differently (they might be willing to say some things when talking to thin air that they wouldn't say when someone is listening). Proper English is all well and good, but make sure your characters sound like real people when they speak, rather than like robots.
Always read your work out loud. You'll find where the words are stiff or unnatural.
To the previous Element
To the next Element