After Hamlet kills Polonius, his mother is scared and criticize what a horrible thing Hamlet has done. But Hamlet is provoke by her words, he is mad and he thinks his mother is the one who actually does the horrible things. And his mother seems doesn’t know how the king Hamlet really dead.
The ghost comes in when Hamlet argues with his mother. And Hamlet notices that his mother can’t see the ghost and he is surprised.