The Adventures of Tom Sawyer is written in an episodic, humorous way.
More than a single storyline, the book is written in an episodic way with multiple separate storylines. Once the story begins moving along to the climactic incidents of the cave and the treasure, we start to have a longer plot line. However the beginning of the book is made up of several brief plot lines lasting a chapter or two.
By using episodes, Twain keeps the story light and humorous. It is not until the end that things really seem serious, but even serious events like the murderous Injun Joe are treated with humor. When Tom fakes his death, there is a pang of sorrow, but the story is still funnier than it is sad.