Tom Sawyer is the character who changes the most in the novel. At the beginning, Tom is typical "boy's boy": high energy, mischievous, and interested mostly in himself and his own pursuit of pleasure. He is willing to lie to get out of trouble and is often only tripped up by Sid ratting him out or Aunt Polly noticing some small inconsistency in his story. Tom is quite willing at the beginning of the novel, too, to manipulate other boys into taking on his punishment in whitewashing the fence.
A dynamic character, Tom grows over the course of the novel to become more than just a stereotypical high-spirited trickster lad. His social conscience becomes more acute, especially as he faces up to what he knows about Injun Joe as a murderer. We are told,
Every reference to the murder sent a shudder to his heart, for his troubled conscience and fears almost persuaded him that these remarks were put forth in his hearing as "feelers"; he did not see how he could be suspected of knowing anything about the murder, but still he could not be comfortable in the midst of this gossip.
This crisis of conscience leads Tom to think of more than saving his own skin. Yet, as another evidence of his moral growth, he fears that his own willingness to testify in court might harm Huck, whose part he tries very hard to keep out of the situation.
Tom's facing down the fearsome Injun Joe shows his new maturity. He has made the right decision to help his community convict a murderer, even at a cost to himself.