Sonnets are perhaps one of the strictest of the poetic "closed forms." They fall into two primary categories: Elizabethan (the style developed during the reign of Elizabeth I and most widely remembered because of Shakespeare's use of it) and Italian (where the form originated with the poet Petrarch). So, you may hear someone refer to one or the other as a "Shakespearean sonnet" or a "Petrarchan sonnet" as well. One thing they share, like a haiku, is a distinct number of lines: 14. As you'll note in "Ode to the West Wind," Shelley, too, has 14 lines; however, in "Ode to the West Wind," we have a different arrangement of the 14 lines: 4 tercets (a 3-line stanza) and a couplet (2-line stanza). In the Shakespearean sonnet, you have 3 quatrains (4-line stanza) and a couplet. In the Italian sonnet, you have only an octet (8-line stanza) and a sestet (6-line stanza).
Let's take a closer look at each of these.
The Elizabethan, or Shakespearean, sonnet, has both a distinct stanzaic pattern (3 quatrains + couplet), and a distinct rime scheme. In this form of the sonnet, the rime scheme follows along with the stanzaic form: ABAB, CDCD, EFEF, GG. (The reason for the different lettering is to indicate a new "sounding" rime, so rimes are generally NOT repeated once used in the Shakespearean sonnet.) Generally, in this type of sonnet, the quatrains set up a problem or issue (unrequited love, sorrow, etc.) and the couplet at the end provides the resolution or solves the problem. Because of its importance in the poem, the couplet at the end is sometimes referred to as the "heroic couplet" (like a "hero" who saves the day).
In the Italian or Petrarchan sonnet, some of the same rules apply. There is a definite rime scheme: ABBAABBA CDECDE. However, some Italian sonnets maintain the octet/sestet structure but alter the rime pattern. In addition, it also establishes the same narrative structure, the octet introduces a problem/issue, and the sestet solves it.
One important thing to note about both types of sonnets (and most other sonnet forms, like Shelley's as well) is the "meter" employed by each line. Each line uses what is referred to as "iambic pentameter." Lines of poetry are measured in "feet" (sections), so iambic pentameter would contain 5 "feet" of iambic rhythm. An iamb is a single metric that is most generally an unstressed syllable followed by a stressed syllable. For example, "How do I love thee? Let me count the ways." You wouldn't necessarily read it this way, but if you sound it out, you see that it fits the pattern: How do I love thee? Let me count the ways. (Pah-dum, pah-dum, pah-dum, pah-dum, pah-dum) The bold face indicates the stressed syllable/word. When we examine poetic lines for a specific type of rhythm or meter, we call that "scanning."