Tom has been ordered to whitewash the garden fence by Aunt Polly as punishment for his bad behaviour, and finds this a very hard and boring task. However, he manages to coax first Ben Rogers and then various other boys of the village into doing it for him.
Tom does this in an ingenious way, by pretending that actually whitewashing is a lot of fun, and something that a boy doesn’t get the chance to do very often. This makes Ben and the other boys envious, so that they actually want to do it instead of him. Tom retires in triumph to watch them. Moreover, he gets marbles and various other bits of ‘wealth’ from them, in return for letting them perform this great task.
The author explains what Tom has managed to do:
He had discovered a great law of human action, without knowing it, namely, that, in order to make a man or boy covet a thing, it is necessary to make the thing difficult to attain. (chapter 2)
Therefore Tom succeeds in making the job look like something attractive, so that the other boys will ‘covet’ it, desire it. The incident is a light-hearted one, but Twain uses it to illustrate a larger human truth.