Conflict in literature is the central struggle between characters or competing forces, such as man against nature, society or himself. The conflict is introduced in the exposition, or the beginning of the story, and sets the stage for future events. Some stories contain more than one conflict, but there's usually an underlying primary struggle that the protagonist or protagonists must address.
Details the Struggle
The major struggle has one of two forms -- internal or external conflict. Internal conflict occurs when the protagonist struggles to deal with his own fears, shortcomings or battles within his mind. For example, "The Metamorphosis" by Franz Kafka is about Gregor's fear of being unloved and unappreciated by his family. As he slowly changes into an insect, he questions his own sanity and life purpose. External conflict occurs when the main characters battle against other characters, society as a whole or nature, such as the weather or the gods. For example, in "The Hunger Games" trilogy by Suzanne Collins, Katniss struggles against other characters, specifically President Snow, in her fight for justice.
Creates the Central Action
Conflict is the triggering force that drives the central action. During the climax, characters typically come face-to-face with their internal or external conflicts; sometimes they must face both. The conflict culminates during the climax -- the most intense part of the story that signals a turning point in the characters' lives. Conflict is the cause or reason behind the primary characters' active response to their circumstances. For example, the main conflict in "The Maze Runner" by James Dashner is Thomas and his friends' entrapment by the government agency WICKED. This conflict drives Thomas to enter and solve the maze.
Sustains the Plot
The conflict creates interest and suspense and keeps the plot moving at a steady pace. Characters struggle with complex conflicts that force them to change, adapt and react or pay the consequences. In many cases, conflict brings out the best in characters and forces them to come to grips with their struggles, but not always. For example, Ichabod Crane in "The Legend of Sleepy Hollow" by Washington Irving, chooses to give into his greedy, selfish desires rather than pursue his love interest with pure motives. Regardless of the outcome, internal and external conflicts drive the plot.
Leads to Resolution
The conflict leads to resolution for the characters. They must face the situation, deal with the hardships and overcome the challenges. For example, in "To Kill a Mockingbird" by Harper Lee, the Finch children resolve their conflict with society when they realize justice and equality are more important than popularity. In another example, Odysseus resolves his conflict with nature when he makes peace with the Greek gods in the epic poem "The Odyssey" by Homer. Conflict leads to the most important part of the story -- the moral or the message.