Synecdoche is a type of metaphor. This excerpt from The Grammar Devotional explains how to use synecdoche and gives you some examples. I bet you’ve used it without knowing the name.
Synecdoche is a specific type of metaphor in which you use part of something to describe all of it:
• calling a credit card plastic
• calling sailors hands
• calling hungry people mouths to feed
• calling someone who reads your manuscript a second set of eyes
Or it's when you use all of something to describe part of it: saying use your head when you mean use your brain to think.
You find synecdoche when a poet fixates on a physical characteristic of a subject, such as his or her eyes or lips, and in literature when one character will refer to another by a nickname that highlights some part of his or her body:
Here comes "The Mouth" again. Can't we make him stop talking?
Get more tips like this in The Grammar Devotional