Ender begins the story as a naive, trusting six year old, but not as the typical six year old of today. He is extremely gifted in battle and strategies beyond his years. As the events unfold, Ender becomes a lonely outcast and understands that he is being manipulated by the adults and the military. He learns to cope with the loneliness by withdrawing from people. He learns from situations, both good and bad, and puts that knowledge to work manipulating others. He becomes cynical yet masterful. His love of his sister never dies, and the manipulative military uses her to steer Ender in the direction they feel is best. Ender knows this but continues to love his sister while steering the military in the direction he wants them to go. Once the war is over, he withdraws from the world and travels in space doing only what he wants with his equally burned out sister as his companion.
I’m glad that the question specified “book,” because the movie got a lot wrong. One simple change that Ender goes through over the course of the book is a simple aging process. He is six years old when the book begins and eleven years old when he defeats the buggers. He then goes on a two-year journey with his sister at relativistic speeds, which messes with time dilation, so depending on how you count, Ender is either around thirteen when the book ends or over fifty.
"Demosthenes retired. Now I'm going with the first colony."
"It's fifty years to get there—"
"Only two years if you're aboard the ship."
Besides aging over the course of the novel, Ender’s emotional state changes drastically. Throughout the book, Ender is presented to readers as an underdog. He’s young, he’s small, he’s the third child in a family, and so on. For those reasons, Ender is the target of bullies at his Earth school and the Battle School. In the beginning, Ender is a fearful child and afraid of retaliating and defending himself because he fears that he would be similar to his sadistic brother, Peter. As Ender encounters more and more bullying, he begins to understand that in order to not be a target, he needs to stand up for himself. He first does this with Stilson, and Ender ends up killing him. By chapter twelve, Ender fully understands the importance of standing up for himself and pressing any advantage over an enemy.
"Use what they give you," Ender said. "If you've ever got an advantage over the enemy, use it."
He refused to feel weak because he was wet and cold and unclothed. He stood strongly, facing them, his arms at his sides. He fastened his gaze on Bonzo.
The only way to end things completely was to hurt Bonzo enough that his fear was stronger than his hate.
Peter might be scum, but Peter had been right, always right; the power to cause pain is the only power that matters, the power to kill and destroy, because if you can't kill then you are always subject to those who can, and nothing and no one will ever save you.
The hardness that develops in Ender further isolates him from friends and loved ones. They first see him as a liability, and as the book progresses, they see Ender as very dangerous and the likely savior of the world. In each case, Ender struggles with developing any kind of emotional bond with anybody. Even his bond with Valentine is stretched to the limit.
Near the novel’s conclusion, Ender figures out that all of his recent “tests” and simulations have been the real thing. He’s horrified to learn that he has likely annihilated an entire species.
"I didn't want to kill them all. I didn't want to kill anybody! I'm not a killer! You didn't want me, you bastards, you wanted Peter, but you made me do it, you tricked me into it!"
That’s important because it shows that while Ender does become colder, lonelier, and harder throughout the novel, he never loses his humanity.