Synecdoche is a type of metonymy; it is a figure of speech in which a term for a part of something is used to refer to the whole, or vice versa. The term is derived from Ancient Greek συνεκδοχή (sunekdokhḗ) 'simultaneous understanding'.
A common example of synecdoche: using the term boots to mean "soldiers", as in the phrase "boots on the ground".
Metonymy is a figure of speech in which a concept is referred to by the name of something closely associated with that thing or concept.
The Pentagon is the headquarters building of the United States Department of Defense, and is a common metonym used to refer to the U.S. military and its leadership.
Fleet Street (where most British national newspapers previously operated) is used as a metonym for the British press.