Most people are very consistent in their lives. If Tom gives to a charity one year, the charity can usually plan on him giving the next - they just send the envelope. If he buys a new Triumph Spitfire when his old one is three years old, after three years he will probably buy another one, and the salesman will be waiting with a brochure in his hand. He will go home to the same house and sleep with the same wife every night. If he deviates from this pattern, there is a good reason.
A lot of inconsistent characters march through screenplays. One scene they fight someone over an insult, the next scene they wink at someone who punches out their mother. This is called "action that is out of character." If the character is drawn well, the audience should almost be able to predict their actions and they will be similar from scene to scene, unless something serious changes their motivation.
Trudy is a police officer who has just stumbled onto a car theft ring. In this scene she bravely goes undercover to identify the thugs. In following scenes she refuses to go near them as if she doesn't want to muss her hair. Why? Mirrored characters have no real depth. She is just a surface reflection and it is only the writer's whim which makes her do this or that. But if she has a real background and is motivated, then she will be consistent.
Give characters a life which includes real motivations. If a policewoman has a family to think of, she is much less likely to take risks. In every scene, the specter of her family will hang over her and temper what she does. She would be more careful in her undercover work and, as a more real person, less frivolous in later scenes.
Suppose I write the policewoman's storyline so that in the first scenes she is frightened of doing the undercover work, but in later scenes she boldly confronts the bad guys. "Aha," says I, being no muddlehead, I can see clearly she needs a motive. So I make her afraid of the big ugly men in the early scenes, then have her take a karate course later to overcome her fear. Won't this work? This is called a manipulated or contrived plot. Instead of the character acting and reacting honestly in the scene, the character goes through moving his arms and legs and mouthing words to fit what the writer wants to make happen. It is usually obvious to the viewer.
Form realistic characters with full lives, then let the story reflect what would realistically happen. If the character has a real background with real motivations, and is allowed to act honestly in a scene, then she will be consistent. A policewoman, constrained by department regulations and a family, will enter every scene or situation hesitant to take unnecessary risks, and will always be looking for ways to prepare herself.
Trudy the Policewoman, with a husband and three kids at home, in scene after scene breaks regulations and goes after the auto theft ring leaders with no backup. Does she have a deathwish? Going in alone would be out of character for the police.
1) Get in tune with your character. Making a character do this would say you have no empathy for the character and her situation.
2) Make sure you know police procedures. If a situation calls for backup, then it will seem ludicrous to the audience if the character goes in without backup without a justified reason.
"Excursus One: How To Raise Dead Characters"
Chapter 10, "Manipulated or Contrived"
Chapter 12, "Credibility"
Chapter 23, "How To Use Motivation To Form Characters and Plot"