Sonata form is a musical structure that consists of three main sections in an A-B-A pattern. These sections are commonly referred to as exposition, development and recapitulation. The development section typically differs substantially from the other sections, not only in melody but also in other ways often including tempo and key. Sometimes there is also an introduction section, which is generally shorter and slower than the main section and may or may not contain thematic material that is used in it. Likewise, there is often a coda following the recapitulation.
Sonata form came into widespread use in the middle of the 18th century and has been the most frequent musical pattern in classical music. It is commonly used in the first movement of symphonies, concertos and various forms of chamber music. This enduring popularity over a span of roughly two centuries is attributed to the tensions created by the contrasts between adjacent sections in combination with the good overall balance.
Sonata form differs from a sonata in that the former is a musical structure whereas the latter is a composition, usually for a solo instrument, that is commonly written in sonata form.