This is perhaps the most famous soliloquy in Hamlet, and indeed in all of Shakespeare's plays. In it Hamlet weighs the relative benefits of life ("to be") and death ("not to be"). To live involves constant struggle against the travails that life throws at him ("the slings and arrows of outrageous fortune"), and he thinks momentarily that death, even through suicide, might bring a welcome sleep.
But if death is truly like sleep, then it is possible that we might dream, which is, to Hamlet, "the rub." This is what keeps people from choosing suicide, for life is so unbearable that we would choose to end it if we weren't afraid of what came after. Most would rather continue to live, as bad as life may get, rather than risk the possibility that what comes after could be even worse, or more of the same.
This soliloquy is significant because it demonstrates that Hamlet's increasing melancholy is not entirely...
(The entire section contains 2 answers and 480 words.)