Shakespeare was such an amazing sonneteer that there is actually a type of sonnet today that we refer to as a "Shakespearean Sonnet"! Even though Shakespeare isn't the inventor of the Shakespearean sonnet, he was certainly the master of this kind of poem. Quite simply, a Shakespearean sonnet contains fourteen lines of iambic pentameter. It has three quatrains (four lines each) and a final rhyming couplet (of two lines). Therefore, the rhyme scheme is always abab cdcd efef gg. Most often a problem is presented in the first 12 lines or so with a solution following by the end of the poem.
During the Elizabethan period, writing groups of sonnets with similar themes (called a "sonnet sequence") became very popular. Shakespeare wrote the best of these sonnet sequences, in my opinion. His contained a full 154 sonnets. They focus on a handsome young man, a rival poet, and sometimes even a "dark lady." These subjects often cause scholars to disagree upon the truth behind Shakespeare's life and sexuality.
A sonnet is a form of a poem which specifically has fourteen lines and a structured form. It was popularized in Italy where it originates; hence the Italian or Petrachan sonnet, named after Petrarch due to his expert and extensive use of this form. The Elizabethan or Shakespearean sonnet is so named because it was formed and became distinct from the Italian sonnet during the Elizabethan era and Shakespeare was its most prolific and famous user in writing about love. Shakespearean or Elizabethan sonnets are divided into three quatrains (four lines each) and a rhyming couplet at the end with a recognizable rhythm created by the rhyme scheme and the five stressed syllables per line (iambic pentameter).
In making use of the form of the sonnet himself, Shakespeare is credited with having penned 154 sonnets, with almost all of them following the Shakespearean format. Each sonnet largely presents an idea in each of the four line stanzas and the rhyming couplet completes the picture.
The apparent sequence which Shakespeare's sonnets follow has been the subject of much discussion and debate among critics but the first 126 sonnets are addressed to a young man although most of the time this is not explicitly expressed and the latter section is about Shakespeare's relationship with a woman with only the last two sonnets being adaptations of classical verse. There is no known autobiographical element to these sonnets although some critics have gone to great pains to find a connection other than his instinctive ability to create beauty and question the definitions of it from his surroundings.