Synecdoche (pronounced 'sin-ECK-der-key', IPA: /sɪn ˈɛk də kə (or ɪ)/) is a more precisely limited form of metonymy. It means the use of the name of a part of something to stand for the whole thing, as when young men say they have "a nice set of wheels", when they actually mean they possess a whole car that they find pleasing, rather than just four round things. Confusingly, it can also be used to mean the use of the name of a whole thing to mean just a part of it, as when sports reports say "England won", when they mean strictly speaking that the eleven men in the English football team won.
In the olden days, ships were often referred to just as "sails": "How many sail in the fleet?" This was the classic example of synecdoche as the 'part for the whole', and could be followed by another example: "And how many hands on board?" (And I have only just noticed while writing this - forty years after a schoolteacher first tried to make me understand it - that "board" itself is a synecdoche (or in the looser way, a metonymy) for a wooden ship, made of many planks.)
An example of applying synecdoche the other way round, as 'the whole for the part', is where we say "I'll just boil the kettle", where realistically and literally we are only boiling the water in the kettle. (To boil a kettle - made of metal - takes higher temperatures than one can achieve in most private houses.)
The difference between metonymy and synecdoche is not universally agreed. Another article compares the meanings of the two terms: metonymy - synecdoche. Unless you aim to be a specialist, we would advise you to use only the word metonymy.