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.
Depending on the nature of the scene, and the nature of the conflict, tension will either be rising or falling. Most scenes have at least one rising conflict, unless the previous scene was particularly intense, such as the death of a main character.
Tension is an integral part of what makes the scene interesting. Make audiences care about the characters, present a threat, and create an uncertain outcome.
Tension starts as a threat, the anticipation of pain, loss, and/or tragedy. Hitchock once explained it by imagining two people casually drinking tea at a café. The camera pans down to reveal a bomb under the table, counting down. There is now an imminent threat to the characters, and as long as the threat doesn’t resolve, as long as the outcome is uncertain, the tension remains unresolved. Once the bomb goes off, the threat is over, tension begins to dissipate.
An essential ingredient in creating a strong threat is making audiences believe the danger is real. Once in a while the threat has to follow through and harm the character(s). For example, many stories within the 007 series feature the protagonist in extreme danger, but any veteran of the series knows that the protagonist almost always gets away unscathed, rendering the threat impotent.
The solution is to scale down the threat to a point where the villain can follow through. If the villain can’t kill the protagonist, then perhaps they can hurt them a lot. For example, in the film Batman Begins, the hero threatens to drop a villain, but lets them down safely. In the sequel the hero drops a villain from a lesser height, but he does follow through on his threat.
If it seems like the audience has become desensitized to threats, the author can use that to create an extra strong scene when they surprise the audience by following through on the threat.
Once a conflict resolves, tension begins to decline, and the story transitions from one conflict to the next. The greater the drop in tension, the more time audiences need to transition. For example, consider Fellowship of the Ring. Partway through the story a main character dies. That’s a very intense loss, and the decline in tension lasts several chapters. Other, smaller conflicts rise and fall within that decline, but the loss itself takes quite a while to get through.
Remember that a conflict can resolve in one of two ways; permanently or temporarily. In the Harry Potter series, the protagonist has an ongoing conflict with Draco Malfoy, another student at the school. Throughout the story they have many self-contained conflicts, which do resolve, but the overall conflict of their rivalry is unending.