I assume you're talking about plays and such...
In literature, a dialogue is a form in which at least two people talk to each other. This is in contrast to a soliloquy or other such literary forms where a person essentially gives a speech that is not part of a conversation.
So, for example, in Romeo and Juliet, she asks him "How camest thou hither, and wherefore?" This means "how and why did you come here?"
He answers "With loves light wings did I o'er-perch these walls" meaning "I got over the wall by love." That's dialogue -- she asked him a question and he answered.
That's in contrast to what happens before... she's talking as if she's talking to him, but she doesn't know he can hear. So she's not actually speaking to him when she says
So the first is dialogue because they're having a conversation, the second isn't.
"What is dialog," smart-kid53 asked curiously.
"Dialogue (occassionally seen as dialog) is the act of having a conversation between two or more people. It also refers to the conversation itself. In literature, it reveals the thoughts and feelings of the characters which make them seem more realistic," ask996 answered with absolute certainty.
"Oh, now I understand."
"That's because you're a smart-kid53. Do you also realize that every time the speaker of dialogue changes, the author starts it on a new line? And don't forget this entire conversation was a dialogue about dialogue."
"Why doesn’t the author just tell us? What the characters think and feel?
"Well perhaps the author wants to make a stronger personal connection to the writing for the reader, or maybe this gives the author a chance to reveal more about the character through the use of dialect as well."
"Dialect is the way people speak based upon education, economics, environment, geography, and etc."
Dialogue is, in short, talking. It is the exchange of thoughts and ideas. Usually, to put dialogue in a piece of literary work, one is adding an essential element. A story cannot do well if it has no dialogue.
"What?!" he said.
"I told you to take out the trash weeks ago!"
That would be an example of dialogue.