In music, a coda (Italian for "tail", plural code) is a passage that brings a piece (or a movement) to an end. Technically, it is an expanded cadence. It may be as simple as a few measures, or as complex as an entire section.

The presence of a coda as a structural element in a movement is especially clear in works written in particular musical forms. Codas were commonly used in both sonata form and variation movements during the Classical era. In a sonata form movement, the recapitulation section will, in general, follow the exposition in its thematic content, while adhering to the home key.

The recapitulation often ends with a passage that sounds like a termination, paralleling the music that ended the exposition; thus, any music coming after this termination will be perceived as extra material, i.e., as a coda. In works in variation form, the coda occurs following the last variation and will be very noticeable as the first music not based on the theme.

More Info: en.wikipedia.org