A coda (Italian for "tail") is a concluding passage of a piece or movement, added after the main structural form has been completed. Its purpose is to bring the piece to a satisfying close, often by reinforcing the tonic key, reiterating thematic material, or building to a final climax. Codas can range from a few chords to an extensive section.
Ludwig van Beethoven was particularly known for his extended and dramatic codas, which often took on significant structural importance rather than being mere afterthoughts. For example, the final movement of his Symphony No. 5 features a powerful and lengthy coda that solidifies the triumphant C major key.
The concept of a concluding section has existed in music for centuries, but the term "coda" became more formally recognized during the Classical period. While earlier codas were often brief, composers of the Classical and Romantic eras, especially Beethoven, expanded their scope, making them integral to the emotional and structural narrative of a piece.
Listen to the fourth movement of Beethoven's Symphony No. 5. The main form concludes, but then a substantial and energetic section begins, reiterating themes and building to a powerful finish. This extended concluding section, starting roughly around the 6:00 mark, is the coda.