Dialogue, along with prose and description, represent the 3 aspects of scene writing. Characters are either observing, taking action, or talking (sometimes to themselves). Among the 3, dialogue is unique in that it grants every character a voice of their own.
A conflict can be rooted in the main plot, it can be rooted in a relationship between characters, or it can be both. Here are a few strategies for creating a new conflict in a scene.
Within a scene each character has a goal and obstacles preventing them from achieving that goal. This means every scene contains at least one conflict, if every character is collaborating or competing to achieve the same goal.
Tension is created whenever a conflict prevents a character from achieving a goal. This can be a force of nature, another character, or an internal struggle, such as the character debating what to do. Tension also helps to create a sense of pacing, the rate at which scenes progress. Generally an audience will perceive a low tension scene as longer than a high tension scene.
Part of good storytelling is making the audience believe in the story, believe that the characters really existed, acting out events exactly as the author outlines them. This means everything the character says and does needs to be rooted in who the character is. An author must always be aware of why a character acts and reacts as they do, so that audiences never stop to consider the invisible hand behind the curtain.