After the visit of the Ghost, Hamlet changes. Ophelia describes his costume as "his doublet all unbraced, no hat upon his head, his stockings fouled and down-gyved to his ankle." This is Hamlet of the antic disposition. His pretense of insanity gives him the liberty to sharpen his wit on the various spies which come to sound him out. He becomes more active, arranging for and essentially directing the play The Murder of Gonzago, but he is a perfectionist, and cannot see his way to killing Claudius without the circumstances being just right. He thinks he has got them right but he is wrong--it's Polonius behind the arras and not Claudius.
Then he is sent to England. He discovers that Claudius is not going to wait for the perfect opportunity, but has already made arrangements to have Hamlet killed. He changes again. He arranges for the deaths of Rosencrantz and Guildenstern, and when the pirates attack, he takes the opportunity to board their ship, and bribes them to return to Denmark. He arrives on the shores "naked and . . . alone". "Naked" here means that he has only the clothes he stands up in, whatever he can find. Hamlet is now an opportunist. He no longer insists that the conditions be perfect. He will take his opportunity where he finds it. He becomes a fatalist: "There is a special providence in the fall of a sparrow . . . the readiness is all." It is when he reaches this stage in his journey that he can do what he wants to do and needs to do. He expresses his love for Ophelia (too late) and is able to take his revenge on Claudius (almost too late).