The opening of the story tells us that Tom Sawyer is a bit of a troublemaker. We can reasonably infer this because, in this scene, the young lad is hiding from his Aunt Polly in a closet with jam all over his hands; it would seem that Tom has been sneaking into the pantry.
As Twain makes clear right from the start, Aunt Polly is quite a forbidding figure, a woman who doesn't take any nonsense from anyone, especially not from a young whipper-snapper like Tom. Once she discovers Tom's hiding place, she resolves to give her mischievous nephew a good switching.
But Tom manages to avoid a good beating by momentarily distracting Aunt Polly and then running off. It's at this point that we realize that Tom is quite clever as well as sneaky. We also understand that Aunt Polly is not quite as much of a martinet as we initially thought she was. She's clearly very affectionate towards Tom, as can be seen from her rueful reflection that she lets him get away with too much.
Later on, we see yet another stage in the epic battle of wills between Aunt Polly and Tom when Tom comes home after playing hooky. Aunt Polly is suspicious of Tom's wet hair and thinks that perhaps he went for a swim instead of going to school (which he did). But Tom is briefly able to talk his way out of trouble by showing Aunt Polly that the thread on his collar hasn't been broken, so he couldn't have taken off his clothes to go swimming.
Unfortunately for Tom, cousin Sid is on hand to point out that the color of thread on Tom's collar is different than what it used to be, indicating that Tom removed his collar to go for a swim, then sewed it back on later with a different colored thread.