There are three pillars to keep in mind when crafting story in such a way that the audience can engage. These are: Goal, Motivation, Sympathy.
Goal is simply an understanding of what the protagonist is trying to do. This should be the engine of the A-story; our story is about the protagonist pursuing the goal. If we don’t even know what the character is doing, then instead of story it’s just incident; stuff happening. There is no plot or momentum. If the audience can’t perceive or understand what the protagonist is trying to do, it’s easy for them to get disinterested and bored. We as a species like to watch people doing things.
Motivation is understanding why the protagonist is pursuing the goal. If we see a character pursuing a goal, but we don’t know why, then we can’t engage. But if we understand a) what a character is doing and; b) why, then we have two of the prime ingredients for story.
Sympathy is in some ways the most important pillar, because it’s the “why we care” aspect of story. We might understand what the protagonist is doing and why, but if there’s no way or reason to emotionally invest in the goal and motivation, then… why watch it at all?
Sympathy works best when it’s paired with motivation. That is, we understand what the protagonist is doing because it’s for the same reasons we would do something similar in the same situation.
Sympathy is often crafted from universal morality; the protagonist is doing the right thing for the right reasons, so we’re behind them. Or it can come from a negative; we’re rooting for the protagonist because we hate the bad guys so much.
For example, in Raiders of the Lost Ark, Indiana Jones is searching for the Ark (goal) to keep it out of the hands of the Nazis (motivation). We know what he’s doing and why. And we (sympathize) because boo Nazis, Nazis are bad, we don’t want them to have the Ark.
Sympathy can also be generated by simply liking the protagonist, or at least understanding them. This is how we get the audience behind anti-heroes.
For instance, in Breaking Bad, Walter White goes down some pretty dark roads, but we consistently sympathize because the storytelling works to help us understand where he’s coming from, and the character has enough good elements (love for his family, etc.) that we can get behind his motivations. The same can be said for Vic Mackey in The Shield, Tony Soprano in The Sopranos, and so on.
There are exceptions to every “rule,” of course. For example, there is such a thing as a “hang out” movie in which the storytelling isn’t driven by a single, clear A-story goal; we’re talking about films like Dazed and Confused and American Graffiti. And some movies make their anti-heroes awful enough that they’re daring the audience to like them, as in Young Adult.
But it never hurts to craft every scene and story by starting with our three pillars.