A metaphor is a figure of speech. It is a figure of speech that makes a comparison between two things that are seemingly unrelated; however, the comparison helps point out common characteristics between the two things.
In Henry David Thoreau's "Civil Disobedience," he makes use of the same metaphor throughout the entire piece. Thoreau compares the government to a machine. This comparison should not come across as shocking to readers, as Thoreau was writing the piece on the heels of the Industrial Revolution. While machines did exist prior to the Industrial Revolution, there was a massive buildup of machines as a result of the Industrial Revolution.
Thoreau introduces the machinery metaphor already in his second paragraph, when he admits that people do need some kind of government machinery. This is important because Thoreau isn't arguing for anarchy. He's arguing for a better, more just form of government. Thoreau isn't anti-machinery, but he does know that machinery has inherent problems and can break. One of those natural machine problems is friction, and Thoreau spends a fair amount of time discussing friction in machines and relating it to how friction within a government structure can cause problems or even the eventual breakage of the government. A machine/government with too much friction should be fixed or replaced in Thoreau's mind.
If the injustice is part of the necessary friction of the machine of government, let it go, let it go; perchance it will wear smooth,—certainly the machine will wear out.