Characters are not static constructs, they need to adapt and grow throughout the story in order for them to feel real.
But changes to a character need to feel natural and organic. They must flow with the story, caused by the events the character experiences. No-one would have enjoyed watching Luke Skywalker start swinging a lightsaber and taking on Darth Vader the first time he set foot on the Death Star. We needed to see Luke develop from a frustrated and idealistic farm boy, to an eager and aggressive student of the Force, and finally to a powerful and controlled Jedi Knight, capable of forming effective plans and making hard decisions for the greater good, rather than his own desires.
When I'm creating a character, especially a protagonist, I usually create two versions in my mind. The first is the final result, the hero he is meant to be. The second is who the protagonist is at the beginning. Then I chart out the evolution of the character through various significant events and turning points, always looking for ways I can show the reader how the hero is changing without having it seem stilted and abrupt.