Shakespeare´s sonnets are written predominantly in a meter called iambic pentameter. It´s a type of metric line used in traditional English poetry or verse drama.
Iambic pentameter is a rhyme scheme in which each sonnet line consists of ten syllables so it is considered as a decasyllabic verse. The syllables are divided into five pairs called iambs or iambic feet. Iamb is a metrical unit that contains one unestressed syllable followed by one stressed syllable. To make a comparison of this rhyme the most common example is the sound da-DUM of a human heartbeat.
Here are some examples:
"When IN / dis GRACE / with FOR / tune AND / men's EYES
I ALL / a LONE / be WEEP / my OUT/ cast STATE" Sonnet 29 by Shakespeare.
"When I / do COUNT / the CLOCK / that TELLS / the TIME" Sonnet 12 by Shakespeare.
His plays are also written in Iambic pentameter but the lines are unrhymed and not grouped into stanzas. This type of iambic pentameter, the unrhymed, is called blank verse.
There is some debate over Shakespeare´s work about if the rhytm was originally performed or if it was embedded in the paterns of contemporary speech. Although this when the plays or sonnet are read aloud the iambic beat appears naturally. Scholars have explained that in Shakespeare´s plays there are few stage directions because the verse serves that purpose. The dramatic action of the lines is related to the physical action required.
Hope this answer help you. I give a little resume of what iambic pentameter is to explain better Shakespeare´s work. Regards.