This quote is from Act V, Scene 1 of Hamlet, where the prince, having returned from England, encounters the gravediggers. After seeing the skull of Yorick (the late court jester who Hamlet knew as a child) Hamlet thinks for a while on mortality. What he is saying, more or less, is that the bodies of all of us, even great men like Alexander the Great and Julius Caesar, will die, decompose, and return to the earth. He elaborates:
Alexander died, Alexander was buried, Alexander returneth
into dust; the dust is earth; of earth we make loam;
and why of that loam, whereto he was converted, might
they not stop a beer barrel?
We may think this line of thinking very morbid and odd--indeed, Horatio says as much in response, but it is very much a consistent theme. Hamlet makes similar remarks earlier in the play, where he describes how the body of Polonius is being eaten by worms, and later in the same scene (Act 4, Scene 3) he reminds Claudius that even a king, after his death, may "make a progress through the guts of a beggar" who eats a fish that ate a worm that ate the decaying body of the monarch. Throughout the play, Hamlet is obsessed by death, and these quotes reveal how preoccupied he really is. They are also typical of his dark, yet unfailingly profound, wit.