A “tinker” is (or was) an itinerant craftsman who would travel from village to village fixing metal utensils — pots, pans, kitchen knives, and the like. They were generally held in pretty low repute, and tended to be ready targets for derision.
The profession is obsolete nowadays (nobody mends metal utensils; we just buy new ones), but the word “tinker” is still used in at least one phrase: “a tinker’s dam.” Or it might be “a tinker’s damn.” And you’ll also hear it as “a tinker’s darn.” The usage of the phrase is usually in the form of “I don’t give a tinker’s dam/n/rn,” meaning whatever you’re talking about is so worthless it’s beneath notice (except of course that you’ve just called attention directly to whatever it is).
Oddly enough, there’s a plausible case that all three variants — or at least two of them — are original. In the course of their work tinkers might need to apply heat to an item to be mended, to melt some solder. To cool the item quickly, they needed a bit of water, and a common practice (which you can sometimes still see used today by historical reenactors) was to build a little dam of clay on the workbench to contain a pool of water. Or the pool might alternatively contain melted solder to more easily apply to the item under work. That was “a tinker’s dam.” There are references to the practice in The Practical Dictionary of Mechanics by Edward H. Knight in 1877. He described it as “A wall of dough raised around a place…to flood with a coat of solder.”
However, tinkers were also famous for their impolite language; just as sailors’ language resulted in common phrases such as “curse like a sailor,” there were a number of tinker-related sayings: “swear like a tinker,” “quarrelsome as a tinker,” and, of course “a tinker’s damn” (or “a tinker’s curse”).
These phrases were commonly used in English starting around the 1200s (when the word “tinker” itself appeared from nobody-knows-where). The modern variant about “not giving a tinker’s damn” arose in the 1700s when similar constructions became common. “Not worth a curse,” “not give a curse,” “not care a curse,” and similar phrases appeared. Even Thomas Jefferson, in a 1763 letter, wrote “I do not conceive that any thing can happen…which you would give a curse to know.”
By the 1800s the tinker-related phrases had reached their peak of popular usage. The Oxford English Dictionary suggests it was due to “the reputed addiction of tinkers to profane swearing.”
As for “a tinker’s darn,” it’s a modern version watered down for public consumption, as in a 2003 on CNN when Joe Biden (Senator Biden at the time) said “None of [the Iraqi security forces] are worth a tinker’s darn.” But as with most political language, that particular phrase probably isn’t worth a tinker’s damn.