In dramatic structure, dialogue is used to

reveal information and move the plot.
narrate the events of a story.
describe the characters and setting.
make a play more like a novel.