The Italian word granchio (masculine, plural: granchi), which means crab, comes from the Latin word cancer of the same meaning.
It is from this Latin word that we also get the medical term cancro (cancer), since it was thought at the time that the swollen veins surrounding cancerous tumours resembled the limbs of a crab.
This association also explains why the zodiac sign Cancro (Cancer) is represented by the crab.
Il granchio è scappato via quando ho provato a prenderlo.
The crab scuttled away when I tried to pick it up.
The figurative expression prendere or pigliare un granchio (lit: to catch a crab) means to blunder. The idea of catching a crab being a mistake comes from the world of fishing, where fishermen in search of fish (pesce) would lower their hook and bait to the bottom of the sea, only to catch a crab by accident. Once caught, the crab would immediately start to struggle violently, giving the fisherman the false impression that he had caught a large fish instead of a very aggressive crustacean!
Cavolo, ho proprio preso un granchio acquistando questo telefono usato!
Damn, I made a huge mistake buying this used phone!
A rare variation is pigliare un granchio a secco (lit: to catch a dry crab) but unlike the first expression, it may also describe the very specific situation in which a person’s finger gets caught between two objects, such as a door and its frame. Ouch!
Another figurative translation is cramp. For example, un granchio alla gamba is a leg cramp and un granchio al piede is a foot cramp. Few Italians are familiar with this meaning however, so it’s best to stick with the literal word crampo instead.
In Tuscany, you might hear people describe someone as having il granchio alle mani (lit: a crab on the hands) or il granchio al portafoglio (lit: a crab on the wallet), both of which are idiomatic ways of saying misery or stingy.
Finally granchio is also the word for the claw of a hammer which is used to lever out nails from wood.