Throughout the play, Shakespeare sometimes ends a scene with a rhyming couplet. The sound of the two lines together signals the listening audience to an end of a thought or scene when heard together. If you skim through the play you will find several other examples for this technique. The first clear example of this is the end of Act 1 Scene 3 when Hamlet says, "Foul deeds will rise, / Though all the earth's o'erwhelm them, to men's eyes." Another example is Act 2 Scene 2 when Hamlet sums up his new-hatched plan, saying, "The play's the thing / Wherein I'll catch the conscious of the King."
In both of the these examples, and even in the example of the previous post, it is clear that Hamlet is providing a conclusion to his thoughts that come before these last lines. When reading and listening to blank verse (unryhmed iambic pentameter) the ear is perhaps aware of the rhythm of the lines, but there is a distinct lack of rhyme, so there rhymed lines usually stand out from the rest.
Couplets are used throughout the play, and put in the mouths of many characters. As noted by the Encyclopedia Britannica, a couplet is
"a pair of end-rhymed lines of verse that are self-contained in grammatical structure and meaning."
Each line may itself be a self-contained phrase, in which case we say the couplet is end- stopped. Alternately, the sense of the first line may be incomplete, in which case the couplet displays enjambment. Usually you can recognize these types of couplets because there is no punctuation setting off the end of the first line.
We can find both types of couplet in Hamlet. A good example of enjambment is a couplet mentioned by another answerer:
More relative than this: the play 's the thing
Wherein I'll catch the conscience of the king.
Another example is this couplet from Ophelia (Act III, Scene 1)
Take these again; for to the noble mind
Rich gifts wax poor when givers prove unkind.
An example of an end-stopped couplet is this from Claudius at the end of Act IV, Scene 3:
And thou must cure me: till I know 'tis done,
Howe'er my haps, my joys were ne'er begun.
Shakespeare often ends a scene with a couplet. As noted by another answerer, he frequently uses couplets to end a thought. But while they serve as markers of finality, they have other functions too. For instance, phrasing a thought in couplet form makes it appear more weighty, pithy, or astute.
Moreover, the structure of the couplet allows the playwright to give special emphasis to words and concepts that might otherwise get short shrift in a more natural, everyway sentence structure.
The "play is the thing" couplet is an example of this. It's common in everyday speech for the subject of the utterance ("I") to play a leading role in the sentence, so Hamlet might have expressed his through with the more conventional structure, "I'll catch the conscience of the king in the play." But Shakespeare's restructuring plays down the "I" and gives emphasis to the play and the king.
Finally, I'd like to point out that the reader needs to consider the original pronunciation of Shakespeare's plays in order to appreciate the rhymes of some couplets.
For instance, during the performance of the "Mouse-trap" (Act III, Scene II), the actor playing the king says:
I do believe you think what now you speak;
But what we do determine oft we break.
For many readers today, the end words of this couplet don't appear to rhyme. But according to linguist David Crystal, actors would have pronounced these words so that they rhymed:
"Rhymes with cheek, break, and deck show that speak had a variety of pronunciations at the time."
First off, in easy to remember terms, a couplet is two rhyming lines of poetry in a row.
There are several couplets in Hamlet. For instance, the final couplets in Hamlets speeches are pretty significant in that they define how he thinks.
Below is just one example.
"The time is out of joint. O cursed spite/That ever I was born to set it right!! (1/5/190)"