This passage focuses on the human condition of despair and the dangers and fears of what lies beyond death.
In this most famous of his soliloquies, the fourth of the play, Hamlet ponders the existential state of man after talking with the ghost of his father and learning of the treachery of Claudius. He has also just discovered that his friends Rosencrantz and Guildenstern have come to visit not because they wish to see Hamlet but because they have been summoned to spy on him. With great melancholy resting upon his soul, Hamlet meditates darkly on the "fardels," or burdens, of living. Moreover, this concern with death overpowers Hamlet; he becomes preoccupied with being dead as he moves in his thinking toward the idea of "the dread of something after death" (3.1.77), which might be far worse than the "weary life."
Clearly, Hamlet is in despair as he expresses his weariness in living. And it is only his fear of the
...undiscovered country, from whose bourn
No traveller returns... (3.1.79-80)
that prevents his suicide. He finds too that thinking and being preoccupied with thoughts of death and life lead him nowhere. These meditations upon death lead only to trepidation and inaction.
This quote from Hamlet occurs in Act 3, scene 1, and is part of the most famous soliloquy ever written: "To be, or not to be." In this soliloquy, Hamlet is questioning why we continue to live when dying would put an end to our misery. Your particular quote expresses this sentiment quite well. In the quote, "fardels" is another word for burdens. Hamlet is asking why anyone would bear the burdens of a long and weary life full of suffering and toil. He continues to answer his own question: we do not commit suicide because we are afraid of the afterlife, the unknown, the
undiscover'd country from whose bourn
No taveller returns . . .
And makes us rather bear those ills we have
Than fly to others that we know not of?
Throughout the soliloquy Hamlet describes living as something to bear. Hhe calls long life a "calamity" while death is referred to much more positively as a "quietus" or a "consummation devoutly to be wished." The choice of "fardels" with its negative sounds supports the idea that life is torturous and painful and poses a sharp contrast to the words he chooses to describe death. This diction lends credence to his argument that we bear the burdens of life because we don't know what will happen after death.