Act I, scene ii of Hamlet opens with a very different atmosphere from scene one. Where scene one was set in the dead of night, with the jumpy guards outside the castle and the appearance of the ghost, scene two is set in the pomp and circumstance of what appears to be the very orderly court of Denmark.
The scene introduces the characters of Claudius and Gertrude (King and Queen), Gertrude's son and Claudius' nephew (Hamlet), and Polonius (chief counsel to the king) and his two children (Laertes and Ophelia). The main events of this portion of the scene are Laertes' request to return to France, which Claudius grants, and the chiding of Hamlet for still wearing mourning for his dead father. Both Claudius and Gertrude encourage him to put the past behind him and to stay in Denmark and not return to Wittenberg.
Next, alone onstage, Hamlet has his first soliloquy of the play. In this conversation with the audience, he pours out his deep feelings of hatred and anger towards his uncle and mother and his deep grief over his father's death. He opens the speech with the mention of a desire to be dead himself.
The remainder of the scene concerns Horatio and Marcellus relaying to Hamlet the visitation of the ghost the night before. Hamlet agrees to go with them that night to see if the ghost will reappear.
As for analysis, it is worth noting that Shakespeare has this scene follow right on the heels of a scene in which the ghost describes a court full of corruption. Because of the set-up on scene one, the audience will have this point of view on the court and Claudius as a character before he ever opens his mouth in scene two. In this way, Shakespeare is free to create a Claudius who appears to be a reasonable and judicious man in scene two, since the audience knows, from what the ghost has said, that there is far more going on beneath the surface than Claudius reveals. This juxtaposition creates a picture of a court that might seem orderly and calm on the surface, but that has much corruption and intrigue brewing beneath.
Below are links to the Enotes pages on Summary and Analysis of Act I, scene ii and also the Critical Commentary.