When Hamlet says <em>undiscover'd country, </em>he is actually referring to the afterlife. It is undiscovered since no one who died can return and tell the world of the living what the afterlife is actually like. The living will never be able to know what the afterlife is like because they are still alive - therefore, they will never <em>discover </em>this strange <em>country.</em>
Hamlet is thinking of killing himself that will take his life. However, his teaching thwarts him of what will happen afterlife, which is a place that people travel and never get back. In this scenario, he was referring to a state of death.
However, he has hesitation from his little knowledge about death since nobody had explored the idea has ever returned. Therefore this is a famous metaphor that had been in existence since exploration. Thus his plight will not be solved by traveling to the undiscovered land.