We learn that something's rotten in Denmark and we will all be food for worms.
Perhaps the most famous comment about decay is in reference to Hamlet’s ghost. Marcellus and Horatio see the ghost of the dead King Hamlet and are not sure what to make of it.
Let's follow; 'tis not fit thus to obey him.
Have after. To what issue will this come?
Something is rotten in the state of Denmark. (Act 1, Scene 4)
Marcellus appears to be commenting on the ghost, and also on the state of things in general. After all, the kingdom seems to be in trouble. King Hamlet was killed, and his brother Claudius married Queen Gertrude to become king. There definitely seems to be some moral decay in the kingdom.
Another reference to decay occurs when Hamlet kills Polonius. As part of his crazy act, he makes a comment about the dead man being food for worms. When asked where Polonius is, he makes a macabre joke.
At supper! where?
Not where he eats, but where he is eaten: a certain
convocation of politic worms are e'en at him. Your
worm is your only emperor for diet: we fat all
creatures else to fat us, and we fat ourselves for
maggots… (Act 4, Scene 3)
This is Hamlet's commentary on how we all end up decaying equally, and one’s status in life makes no difference in death. It is designed to make Claudius think he is crazy, but it is also intended as a jab at his new stepfather. Someday, Hamlet is saying, you too will be food for worms.
Hamlet has an interesting conversation with the clown when they are digging Ophelia's grave. The clowns provide morbid comic relief as they make jokes about decaying bodies.
Why, sir, his hide is so tanned with his trade, that
he will keep out water a great while; and your water
is a sore decayer of your whoreson dead body.
Here's a skull now; this skull has lain in the earth
three and twenty years. (Act 5, Scene 1)
Hamlet sees the skull of his former jester, Yorick, and ponders the brevity of life. Everyone dies, and everyone decays, and then everyone looks the same as bones. Hamlet is considering his own impending demise, because he worries that he won’t make it out of his quest for vengeance alive.