Musical quotation

Musical quotation is the practice of directly quoting another work in a new composition. The quotation may be from the same composer's work (self-referential), or from a different composer's work (appropriation). 
Sometimes the quotation is done for the purposes of characterization, as in Puccini's use of "The Star-Spangled Banner" in reference to the American character Lieutenant Pinkerton in his opera "Madama Butterfly", or in Tchaikovsky's use of the Russian and French national anthems in the "1812 Overture", which depicted a battle between the Russian and French armies. 
Sometimes, there is no explicit characterization involved, as when Luciano Berio used brief quotes from Johann Sebastian Bach, Ludwig van Beethoven, Alban Berg, Pierre Boulez, Gustav Mahler, Claude Debussy, Paul Hindemith, Maurice Ravel, Arnold Schoenberg, Karlheinz Stockhausen, Richard Strauss, Igor Stravinsky, Anton Webern, and others in his "Sinfonia".
Quotation vs. variation.
Musical quotation is to be distinguished from variation, where a composer takes a theme (their own or another's) and writes variations on it. In that case, the origin of the theme is usually acknowledged in the title (e.g., Johannes Brahms's "Variations on a Theme by Haydn"). 
In the case of quotations, however, an explicit acknowledgment does not generally appear in the score. Some exceptions are found in Robert Schumann's "Carnaval": 
Examples.
Examples of musical quotations in classical music include:
Quotation is also a tradition in jazz performance, especially of the bebop era. Charlie Parker, for instance, quoted Stravinsky's "Rite of Spring" in his solo on "Repetition", and "Country Gardens" on his Verve recording of "Lover Man"; Dizzy Gillespie quotes David Raksin's "Laura" on "Hot House" during the Massey Hall concert. Dexter Gordon and Sonny Rollins are especially famed among jazz fans for their addiction to quotation. Often the use of musical quotation has an ironic edge, whether the musician is aiming for an amusing juxtaposition or is making a more pointed commentary (as when a youthful Rollins, playing alongside Charlie Parker on Miles Davis's "Collector's Items", throws in a snippet of "Anything You Can Do I Can Do Better," or when the avant-garde saxophonist Ornette Coleman rebuffs a skeptical heckler at the Croydon Hall concert with a snippet of the jazz standard "Cherokee").