It is a figure of speech that replaces the name of a thing with the name of something eles with which it is closely associated.we can come across examples of motonymy both from literature and every day life.
Examples
The given lines are from shakespeares Julies Caesar