Shakespeare is the master of language, and his famous play, Hamlet, is certainly not lacking in literary techniques! Here are a few notable observations about the way Shakespeare uses language:
1. Metaphor: Early in Act 1, Hamlet refers to the kingdom of Denmark in general and more specifically Claudius and Gertrude's marriage as "an unweeded garden / That grows to seed; things rank and gross in nature / Possess it merely." Shakespeare extends his use the metaphor of a garden in other places in play. For example, in Act 3 when he is telling his mother to stay away from Claudius he says, "do not spread compost on the weeds / To make them ranker."
2. Syntax: Use of questions. This play has something more than 400 question marks in it! This relates to the theme of the play in that Hamlet is continually questioning his fate, his duty, his actions, his inactions, the veracity of the ghost, the realities of death etc. Many of those questions are ultimately answered by the end of the play.
3. Humor: True, Hamlet is hardly a comedy, but Shakespeare does use humor, especially at the start of Act 5 as a means to provide some relief from the heaviness and suspense created by the devious plans that are created at the end of Act 4. The humorous conversations between the two grave diggers and later Hamlet and the grave digger are filled with traditional jokes and puns, as well as clever quips. The audience gets a chance to see a lighter side to Hamlet all the while still thinking about the important themes of the play. Hamlet makes a joke about lawyers and how they are buried in all their paper, but he is still, clearly, thinking about death and meaningless of life. Hamlet makes the comically ironic statement that even Alexander the Great is merely dust and could be used to stop a hole in the wall.
4. Allusion: Hamlet speaks with allusions in several conversations which shows his intelligence and helps the audience understand the point he is trying to make. One example is in Act 1. In his first soliloquy, he questions how his mother could so quickly move on from the wonderful King Hamlet to the lesser man, Claudius. He makes the following point: Gertrude married "with my uncle; ... but no more like my father / Than I to Hercules." He also uses allusions to Niobe, Jephthah, and stories of the Trojan War.
5. Motif: Acting. A central, reoccurring motif of the play is the idea of "acting." Claudius is "acting" like a mournful king. Rosencrantz and Guildenstern are "acting" like friends. Hamlet literally tells us he is going to "put an antic disposition on." The acting troupe arrives from the city and puts on a play; their acting must be good enough to trip Claudius into revealing his guilt.
There are many other topics like this that you could explore in the play and you could also find more specific examples of what I gave you above.