Hamlet takes every opportunity to berate and badger Polonius throughout the play, but the most obvious of these instances is found in Act 2, Scene 2, which is the longest scene in the play. Hamlet enters amid a conversation between Polonius and the King and Queen. Remember, at this point we know that Hamlet is either trying to convince others he has gone mad or he has really snapped after seeing his father's ghost. Their greeting has hidden meaning:
Polonius: Do you know me, lord?
Hamlet: Excellent well. You are a fishmonger.
Seemingly, Hamlet talks nonsense, calling Polonius a fisherman; however, in this era, the word "fishmonger" was a slang term for "pimp." Hamlet is quick with words, yet this greeting reveals what he thinks of Polonius's treatment of his daughter, Ophelia. Polonius clearly does not catch the pun, as he says in an aside:
Yet he knew me not at first. He said I was a fishmonger. He is far gone, far gone!
Polonius exits and returns later in this scene with news that the players have arrived. Hamlet this time calls him "Jephthah, judge of Israel," an allusion to a Biblical judge who sacrificed his daughter. Polonius mistakenly takes this to be a compliment, saying
If you call me Jephthah, my lord, I have a daughter that I love passing well.
Hamlet uses simple words in his reply:
Nay, that follows not.
He means that just because Polonius has a daughter does not automatically mean that he loves her. Hamlet knows that Polonius is ready to use his daughter if it means advancement for himself. He also implies that Polonius does not know what it means to love Ophelia, but Hamlet does.
As you can see, these witticisms take a while to explain. The play is full of such talk from Hamlet, but it's worth your time to figure out what some of them mean to recognize how smart Hamlet really is. As I said, this is certainly not the only place in the play where Hamlet makes Polonius sound foolish.