Metonymy is a literary device that uses a specific word (especially a noun) in exchange of a term that represents an idea or an object. Metonymy is an example of the use of figurative language, which can enrich the meaning and literary style of a work.
An example of metonymy would be:
I have devoted my soul to you. The word soul, not only representing the original concept but the act of fully committing to someone.