The subject could actually be a variety of things as Hamlet addresses many different ideas during the soliloquy. The beginning question is basically centered around the idea of whether or not life is worth it, do we suffer the "slings and arrows of outrageous fortune" or kill ourselves and end it all?
He goes on from here to suggest that perhaps death is not the end of it all, perhaps we go on to a sleep but still we dream and if that is the case, maybe all this stuff about morality and doing what's right is important, perhaps the mortal sin of suicide isn't worth it either if you have to deal with the consequences even after you've put yourself to sleep.
He goes on to speculate about this state after death, the fact that no one has ever come back to tell us about it leaves us in the dark and it is this uncertainty that leaves him, and by extension many others, unable to make choices and take action in this mortal world.
In Hamlet's second soliloquy (II.ii. 560-617), he reacts to a speech that has just been delivered by one of a travelling group of players, or actors, recently arrived at the castle. This speech concerns the ancient tale of the fall of Troy at the hands of the Greeks, and the tragic murder of the Trojan king, Priam. The Player appears to be overcome by the emotion of the scene, and ends up with tears in his eyes as he portrays the anguish of Priam's wife Hecuba. In his soliloquy Hamlet expresses his astonishment at the depth of feeling portrayed by the Player over people he doesn't even know. Hamlet berates himself for not being able to feel and act with the same level of emotion, even though he has far more cause than the Player to be agitated, as his own father has been murdered.He tries to work himself up to the same pitch, but he admits his continued misgivings about the whole affair of his father's murder. He worries that maybe the ghost of his father was really some sort of evil spirit, sent to mislead him.He ends by deciding to ask the Players to stage a play which also involves a treacherous murder, to see how Claudius will react. The thinking behind this is that, if Claudius really is guilty of Hamlet's father's murder, he will show signs of his guilt when watching this play.
Hamlet's 2nd soliloquy is right after the ghost exits in Act 1 Scene 5.