When we discuss dialogue, we're usually referring to the words spoken by a character, which are often enclosed in quotation marks. This is called direct dialogue. In the exchange below, everything inside the quotation marks is direct dialogue. The rest is called narrative:
"That fish?" Wendell pointed to the tilapia on Melanie's plate. "Someone snagged it on a hook or scooped it up out of the water in a net with a bunch of others just like it and let it flop around until it died." Wendell sat back in his chair and folded his arms over his chest, his vegetarian lasagna still steaming in front of him.
"Stop with the dramatics." Melanie slid the fish around the plate with her fork. "How am I supposed to eat this?"
Indirect dialogue, on the other hand, is a summary of dialogue. It appears in the narrative. Writers use indirect dialogue when the reader needs to know the conversation took place—and perhaps understand the gist of it—but doesn't need to witness the actual words spoken. In Frederick Busch's short story "Ralph the Duck," the narrator, who is the self-proclaimed "oldest college student in America," overhears his professor talking to other students in the class:
The next Thursday, he was wearing canvas pants and hiking boots. He mentioned kind of casually to some of the girls in the class how whenever there was a storm he wore his Lake District walking outfit. He had a big hairy sweater on. I kept waiting for him to make a noise like a mountain goat. But the girls seemed to like it.
The narrator's take on the professor's behavior is most important in this moment and summarizing the dialogue allows Busch to highlight that.
Indirect dialogue is also used to condense a long conversation. Again, the reader needs to know the exchange took place, but may not need the nitty gritty of how it all went down. Perhaps the information that is discussed is of little substance or it has already been well covered in the story before this conversation:
After dinner, Philip sat with June in the living room and told her about the trip. He described the sunset at the beach on the first night. The long days in conference rooms. He didn't tell her about the side visit to San Antonio to see his sister, Alice, or that he planned to see her again.
An author might use a combination of indirect and direct dialogue for emphasis. In Tim O'Brien's short story "The Things They Carried," set in Vietnam during the war, Lieutenant Cross blames himself for the death of Ted Lavender, one of the men under his command:
They marched until dusk, then dug their holes, and that night Kiowa kept explaining how you had to be there, how fast it was, how the poor guy just dropped like so much concrete. Boom-down, he said. Like cement.
Summarizing Kiowa's dialogue highlights his shock over what he witnessed. The reader understands the repetition and what that might mean about Kiowa's state of mind. Though not in quotation marks, the phrase "Boom-down" is clearly Kiowa's and isolating it gives the phrase more emphasis and shows how it might create an emotional weight for Lieutenant Cross, who feels guilty for this death.