As an author, you need to love your characters. You need to love them so much that you can make their lives really miserable. That doesn’t mean slaughtering their families. Killing is easy. Giving them depth is hard.
Characters must have reasons for what they do. Take the doctor in “Alien”. In the beginning of the movie, he opens the airlock blocked by Ripley and lets the contaminated crew members in. At that point, we think he’s doing this because he’s a doctor and he wants to help. Later, it turns out he is an android specifically programmed to gather alien lifeforms, ever at the expense of the crew. This gives the character depth that he doesn’t have when you just make him do things to move the story on.
It’s not necessary to explain everything to the reader; but every action should have a reason and at least you as the author should know that reason. Otherwise, the actions will soon start to become erratic and random. The readers will notice a pattern: There doesn’t seem to be a reason why someone does something except to drive the story on. If you want to check your story against this, ask yourself: Does the character at this point in the story even know why he should do this? Or is he just making life easier for me?
Rambo is another good example for this. It also demonstrates my main point: You must make life as hard as possible for your character. When Rambo decides to stand up against the sheriff, that is the hard decision (just shrugging and walking away would have been much more easy). After that event, things get out of control. The deputies handle Rambo like any other petty criminal, only Rambo is not your standard drunk picked from a gutter. Their abuse triggers Rambo’s instincts that kept him alive in the jungle. Blood is spilled.
Again, all characters could make the decision to step back, calm down, think. Instead, everyone tries to corner Rambo. They are driving him. Rambo escapes them as good as he can and only shoots down the helicopter when his own life is in danger. Again the pattern: Take the hard way.
The “Die Hard” movies work along the same lines. John McLane has a lot of chances just to hide in a corner and wait until everything is over but he never does. He always struggles to get the upper hand. That is what makes a character into a hero.
Many authors don’t get this (at least, it doesn’t make it to the screen). They put big and bigger guns into the hands of their “heroes” (“Eraser”, anyone?) They add bigger explosions or make the evil guys commit worse atrocities. Cameras zoom in deeper and longer when blood is spilled. Guts fly around. Special effects take over. When Norman Bates killed the woman under the shower in “Psycho”, Hitchcock keeps the camera on the drain. We don’t even see the act itself but the scene is more intense than anything I’ve seen in the last twenty years.
If you as an author take the easy way out, so will your character. If you put a lot of effort into making life miserable for your hero (little or no ammo, no shoes, no food, no shelter, no help, no way out) and you can still come up with believable reasons why your hero can survive against all these odds, then your hero will be great.
Or to put it another way: How could your hero be better than your effort writing about him?