What are the three ways Thoreau says a man can serve the state in "Civil Disobedience"?
One of the more general ways Thoreau describes as a function of serving the state is when the public (individuals and/or society as a whole) goes along with a governing body and does not affect its ability to be expedient. In other words, the loyal servant of the state does nothing to disrupt the convenience of the way the state is run. This rules out any kinds of civil disobedience and of course rules out rebellion or revolution. Thoreau describes this, citing and criticizing Paley, with reference to the American Revolution. To serve the state is to "go with the flow" and not disrupt anything.
Thoreau also criticizes those who only oppose certain practices of the government in thought (i.e. continuing to sanction slavery), but do nothing that actually contributes to change. "There are thousands who in opinion are opposed to slavery and to the war, who yet in effect do nothing to put an end to them . . . " As Thoreau says, they wait for someone else to fix the situation. Thus, to complain but do nothing further is to serve the state in practice.
Other ways one can be a servant of the state is to pay taxes and serve in the military. Thoreau argues for nonviolent resistance in this essay and part of the impetus for his writing it came from his own refusal to pay taxes to a government whose policies on slavery and war he disagreed with. Being a servant of the state means that you will participate in sustaining its practices. The nonviolent way to cease being such a servant is to refuse to participate in these ways. Theoretically, if everyone had refused to pay taxes and serve in the military, the government could not have fielded nor funded an army to fight the Mexican War - Thoreau opposed the war because one of the motivations was that it would add slave-holding territories.
Thoreau says that men serve the state with their bodies, their minds, and/or with their consciences. In the first category, he includes soldiers, "the militia, jailers, constables, posse comitatus, etc.". These men act as machines, unconcerned with the morality or even the sensibility of their actions, having, Thoreau says, "the same sort of worth only as horses, or dogs." They are only contributing their bodies to the defense or the exercise of state power. Others, like legislators and ministers, use their minds, but are also not guided by morality in their actions. They are driven by what the state has determined is best, as well as their own ambitions. A last group, described as "heroes, patriots, and martyrs," is guided by their conscience, and they are commonly regarded as enemies of the state, because they resist it rather than acquiesce when it is doing wrong. Thoreau clearly wishes to be counted with the third group, and this, in short, is the point of his essay. People should not obey the dictates of the state when they are in conflict with the dictates of their own conscience.