Sonnets are poems that are fourteen lines long. The rhyme scheme of a sonnet determines whether it is a Petrarchan sonnet or a Shakespearean sonnet. Petrarchan sonnets are of Italian origin, and Shakespearean sonnets were later developed in England. In the Petrarchan sonnet, there are first eight lines with the rhyme scheme 12211221. This is followed by six lines with the rhyme scheme 345345 or 343434 or 343455. The Shakespearean sonnet also has fourteen lines, but they are separated differently. There are 3 quatrains (stanzas of four lines), followed by a couplet. This couplet is a telling feature of a Shakespearean sonnet and is supposed to be the most powerful part, giving a resonance to the ending (although a few Petrarchan sonnets also end in a couplet). The rhyme scheme of a Shakespearean sonnet is 1212 3434 5656 77.
When written in English, both types are in iambic pentameter, that is each line is of five beats (iambs), with the stress on the second syllable in each two-syllable beat. E.G. "Shall I compare thee to a summer's day". In the original Italian, Petrarchan sonnets are written in hendecasyllables, i.e. lines of eleven syllables, which are generally analogous to iambic pentameter in English.