From the Classical period [onward] composers have used Sonata Form to provide the basic framework for their symphonies. A knowledge of Sonata Form is crucial if you want to understand the great symphonies.—thinkquest.org
Above in the diagram, look for four words: Exposition, Development, Recapitulation, and Coda. The Exposition and the Recapitulation are exactly the same, and we'll get to the Development and the Coda later. For now, we'll look at the parts that make up the Exposition and the Recapitulation.
What's a Subject?
A subject is the fancy, musical word for theme. In the diagram, the light blue box (Principal Subject), and the green box (Second Subject), are the two different themes. Principal and Second just mean in what order they go: Principal is first, and Second is obviously second. Each theme should be about eight measures long, or longer, depending on how long the piece needs to be. Eight measures is a good place to start.
After the first theme, (Principal Subject), there needs to be a transition before the second theme, (Second Subject). The bridge should also be about eight measures long. It should start out the same way as the first theme, but transition smoothly, and by the time it's done, be ready for the next theme. Ways to do this could be changing from major to minor, (or minor to major), changing keys, a ritard or accelerando, or a combination.
After the second subject, there is no need for a transition. The closing section or codetta is like a "sub finale." If the conductor wanted, he could stop the piece after the closing section, and the audience would think the song was supposed to end that way. Some composers use new material when writing the closing section, and others reuse material from earlier in the song.
Previous ... themes [are] elaborated, modulated, [and] transformed. The Development section of the movement is essentially a 'free fantasia' on themes established in the Exposition. This is where the composer is allowed to let his imagination run wild - it is where the drama and conflict occurs.
Development is like the music of a movie. Not the credits, but the action. In the development, the composer is not limited by—and should make a point to go outside—the structure of the exposition. The basic themes should be used, but remember this isn't the credits, but a duel to the death. Make it interesting.
In Sonatas, the Recapitulation as easy as putting a D.C. al coda after the development, that leads back the beginning. One must simply repeat the Exposition. Some composers such as Beethoven would rewrite their recapitulations and add to each theme. It doesn't matter how the themes are restated, afterword, is the finale.
Before, the word codetta was mentioned, and called a "sub finale." Just after the codetta is played for the last time, the coda or finale is played. Everything "big finish" about the codetta needs to be taken one step further in the finale. This is the last part of the song the audience will hear, and it needs to remain in their head for a long time. Think of all Beethoven's great finales, and how they do just that. Hopefully any songs you write will one day be just as great.