SARAH: We haven't seen Hamlet since his encounter with the ghost at the end of Act 1, but we know from how other characters describe him that he’s been acting very strangely, and it’s likely that this is part of a plan to “put on an antic disposition” — that is, to pretend to be mad.
RALPH: Just before this segment begins, Polonius has told King Claudius and Queen Gertrude about Hamlet’s strange behavior in Ophelia’s room, and he’s proposed a theory that Hamlet has gone crazy from unrequited love. He’s also offered to find out more about what’s bothering the prince, going so far as to suggest that they send Ophelia to talk to Hamlet while Polonius and the King spy on them.
SARAH: But as they’re discussing this, Hamlet approaches, reading a book, so Polonius decides to talk to Hamlet directly.
RALPH: In this scene, Hamlet plays the fool, and we get to see a new, witty and entertaining, side of his character. Although his remarks sound like the ranting of a madman, he’s in fact making fun of Polonius throughout their exchange.