What did Tom Sawyer do to get put in jail?

he didnt get put in jail. he went to the jail to visit someone. -_-