The prologue to the movie sets up the theme of the movie: people are desperate to get out of Europe and Casablanca is the last stop before Lisbon and "the Clipper to America".
The story starts with news of the murdered couriers, couriers carrying documents, being broadcast by the French police.
The tension begins because the murderers are believed to be headed for Casablanca.
The desire to leave Europe is given a face by the Bulgarian couple who see the plane to Lisbon. The woman says wistfully "perhaps tomorrow we'll be on the plane."
Thus the two elements of the story are introduced: the letters of transit and the people who want them.
Signor Ugarte is revealed to have the transit documents when he gives them to Rick to hide.
Now we know what the documents are, their value, and who has them.
Tension rises when French police captain Renault tells Rick that notorious freedom fighter Victor Laszlo will be in the cafe that evening, and that Laszlo is in dire need of exit visas.
(A character must want something for there to be tension; Laszlo wants the visas. Often in editing notes this is noted as "what does the main character want?")
Laszlo and Ilse Lund come to the cafe. They're told Ugarte has been arrested and thus will not be able to sell the transit papers as promised.
The tension rises when the solution to the problem is blocked. (Ugarte has been arrested, the papers no longer available.)
The audience is left wondering what will happen next which is the essence of tension.
End of Act 1
The next morning, the location of the transit papers is discussed by German officer Strasser and Captain Renault. Strasser theorizes the papers are at Rick's cafe and tells Renault to search.
The tension here is that the audience knows the papers are there because we saw Rick hide them the night before. We wonder if Renault will find them.
The tension abates somewhat because he does not find them.
This is a smaller incident of tension, it doesn't really address the problem Laszlo has.
Laszlo and Ilse come to Renault's office and are told they cannot leave Casablanca without an exit visa signed by Renault, which he will not get.
Tension increase not because the problem has changed (the need for exit visas) but because the solutions are disappearing. First the transit visas from Ugarte are out of reach, now any kind of legal exit visa signed by Renault is out of reach.
Laszlo turns to the black market and visits Signor Ferrari who offers one visa, just for Ilse. She refuses.
"I'll be honest M'sier, it will take a miracle to get you out of Casablanca, and the Germans have outlawed miracles" Ferrari tell Laszlo.
The tension rises again because the third option for exit visas (the black market) is now also out of reach.
But then, a ray of hope:
Ferrari directs Laszlo to Rick, whom he believes to have the papers that Ugarte stole.
Laszlo comes to Rick, and asks him about the transit papers. Rick tells Laszlo the papers aren't available at any price, and if he wonders why "ask your wife". (Ilse and Laszlo are secretly married, something Ilse told Rick earlier in the day.)
Just as Laszlo and Rick are talking about the exit papers, they hear the Germans singing their national anthem raucously in the bar.
Laszlo immediately goes to the band and says "Play Le Marseillaise" The band looks to Rick, who nods, and the band strikes up the French national anthem.
The Germans are drowned out, the entire cafe is on its feet, and the audience understands that Laszlo has just sealed his fate.
Strasser orders the cafe closed at once (the now-famous "your winnings, sir" scene)
Later that evening, Ilse goes back to the cafe. She tells Rick that if he doesn't help them, Laszlo will die in Casablanca.
"What of it," Rick responds.
Ilse pulls a gun and Rick still refuses to hand over the papers. "Go ahead and shoot me, you'll be doing me a favor."
While this scene is tense, the audience isn't really worried that Ilse will shoot Rick, if only cause we know the "rules" of movies: if the hero dies it's at the end of the movie, not the end of Act 2.
But we also can't see how Laszlo and Ilse will get exit visas. We're glued to our seats to find out what happens next.
End of Act 2
Later that night, Laszlo and Karl (the waiter) return to the cafe after an underground meeting is raided by the police.
When Rick sends Karl to escort Ilse home, he and Laszlo stay at the bar. Laszlo asks Rick to give the transit papers to Ilse if he will not sell them to him. Not only give the transit visa to Ilse, but asks that Rick escort her to America.
(this escorting of ladies is nicely laid in twice earlier in the movie: when Yvonne has too much to drink; and when Ilse is in Rick's upstairs room at the cafe.)
Just then the police break in and arrest Laszlo.
Laszlo is now in the hands of the Germans, and Strasser has made it clear that he has no problem killing Laszlo.
The next morning, Rick tells Renault that he will be using the transit papers for himself, and Ilse.
The audience wonders if Rick will do this very selfish thing: leave Laszlo to die in Casablanca. Our sympathies are with Laszlo, we want him to carry on fighting the Nazis VERY much.
Rick has long maintained he "sticks his neck out for no man" but we've seen him act contrary to that twice now: once when he rigs the roulette table to pay out on #22 so the Bulgarian couple wins the cost of their exit visas and second, most tellingly, when he agrees to have the band play Les Marseilles.
Rick says what he's going to do, but our eyes are still glued to the screen to see if he does. We think he will because what other option is there.
The tension is both the lack of options, and the one option that does seem available is one we don't particularly like.
Rick arranges with Renault to set Laszlo up for a bigger crime, one that will certainly get him sent to a concentration camp. Laszlo comes to the cafe with Ilse believing he is bringing Ilse to Rick and they will get on the plane.
Renault arrives to arrest Laszlo.
Much to everyone's surprise, including the audience, this time it is Rick who has the gun.
When all four of them arrive at the airport, Ilse still expects it is Rick who will go with her.
But of course, Rick gives the papers to Laszlo and tells Ilse to go with him.
The climactic moment is catharsis of the best kind. Ilse and Laszlo get on the plane and Major Strasser gets shot.
The problem for the characters in Casablanca is pretty simple: the need for exit visas. Tension builds when the solutions to the problem becoming increasingly difficult, if not impossible to find.
A lot of other things contribute to making this a great movie (my favorite of all time in fact); tension doesn't exist apart from the other story elements. But tension is the fuel for the engine. Without it, the story doesn't move at all.
Any questions? Feel free to disagree in the comment column of course. A variety of opinions is welcome.