The primary thematic material is found in the exposition. This section can be divided further. A first subject group, which may be one or more themes, will be introduced. These themes are all in the home key of the piece. For example, if the piece is in C Major, all of the music in this group will be in C Major.
There will then likely be a transition in which the composer modulates to a new key. In the second subject group, one or more themes in a key different from the first subject group will be introduced. The material of the second subject group is often different in rhythm or mood from that of the first group. Frequently, the material is more lyrical.
Following the second subject group there may be a codetta, which brings the exposition to a close.
The development section follows the exposition. It often starts in the same key in which the exposition ended. Development sections often move through many difference keys. It will usually consist of one or more themes from the exposition, but now altered. Alterations include taking material through distant keys, breaking down themes into their smaller motifs. Sometimes new thematic material may be introduced. Development sections vary in length from piece to piece. Regardless of its length, it almost always shows more harmonic and rhythmic instability than the other sections.
The final section in Sonata form is the recapitulation. The recapitulation is an altered repeat of the exposition. It contains the same first subject group, and in the same form as it was in the exposition. The transition material does not usually change key. The second subject group is also stated again, but may be in a different key than it was in the exposition.
The piece may continue with a coda, which will contain material from other portions of the music. Like the introduction, a coda may vary in length.