Metonymy substitutes an associated object, place, institution, or attribute for the thing meant. The association depends on a recognizable relationship rather than a resemblance.
It differs from synecdoche, in which the substitution specifically involves a part and a whole.