Issues of race in The Adventures of Tom Sawyer center on the novel's half-Native American villain, Injun Joe. Injun Joe is subject to the usual stereotypes about Native Americans – but, and here's the important part – often times he's the one promoting the stereotypes. The book is set in the mid-1800s in Missouri, a slave state, so slavery does factor into the story. Because the protagonists of the novel are only children, we see how conventional views of race affect them at an age before prejudice really has a chance to set in.
By casting Injun Joe as the villain in Tom Sawyer, Twain ensures that issues of race are not merely in the background, so to speak, but center stage.
Reading The Adventures of Tom Sawyer, we come to understand how racial stereotypes are perpetuated, espoused, and, in the case of Injun Joe, embraced.