A sonnet, in English poetry, is a poem of fourteen lines, usually in iambic pentameter, that has one of two regular rhyme schemes - although there are a couple of exceptions, and years of experimentation that have loosened this definition.
One of these schemes is known as the Petrarchan, after the Italian poet Petrarch; it consists of a group of eight lines, rhymed abbaabba, followed by a group of six lines with different rhymes. The distribution of these rhymes can vary, including cdcede, cdecde, cdedce, or even cdcdcd. Often, at the point where the eight-line section, known as the octave, turns into the six-line section, or sestet, there is a volta, from the Italian for 'turn' - this is a shift in the poem's tone, subject or logic that gains power from (or demands?) the matching shift in its structure.
The Shakespearean sonnet breaks into three quatrains, followed by a couplet, rhymed abab cdcd efef gg - as the name suggests, this is the form Shakespeare used for his sonnets, although he did not invent it. In Shakespeare's usage, the three quatrains tend to make an argument in three stages, which the couplet will sum up or comment on.
The main exceptions are the curtal sonnet, a form invented by Gerard Manley Hopkins that roughly maintains the 8:6 ratio over a ten-and-a-half line poem, and the Meredithian sonnet of 16 lines. The fact that these are still referred to as a curtal and a Meredithian sonnet, however, shows that they are not (yet?) considered sonnets per se. There are also innumerable individual exceptions to the form - a poet may refer to a poem as a sonnet because it meets some of the descriptions above, or even just because s/he says so. This means that calling a poem a sonnet is not necessarily to define it strictly, but to say that it stands in relation to the long tradition of sonnets.
Kit Wright's 'Sonnet for Dick' is in the Shakespearean scheme, but once the grief is admitted at the end of the first four lines, the following sentences overflow the shifts in the rhyme scheme, as grief does into life. Mimi Khalvati's 'Overblown Roses' begins with a Shakespearean scheme for its opening eight lines, then performs a volta by turning from the flower itself to what it says about mortality in a Petrarchan sestet. Brendan Kennelly's 'The Happy Grass' and J.D. McClatchy's 'My Mammogram' make similar blends of the two definitions, as does Peter Dale's 'Window', which further adapts the form by moving the second rhyme in each pair a syllable or two back into the line, muting the music of it gently.