The most important comments in the exchange between Hamlet and the Ghost of his father come when the Ghost tells him that he was murdered by Claudius:
Sleeping within my orchard,
My custom always of the afternoon,
Upon my secure hour thy uncle stole
With juice of cursed hebenon in a vial,
And in the porches of my ears did pour
The leperous distilment, whose effect
Holds such an enmity with blood of man (act 1, scene 5).
The Ghost relates how he was sleeping in the orchard one afternoon when Claudius crept up to him and poured deadly poison down his ear. Hamlet
had always suspected his wicked uncle of killing his father, but now he has incontrovertible proof. (To his satisfaction, at any rate.) The Ghost's shocking—though not surprising—revelation is hugely significant because it sets Hamlet on his path to avenge the death of his father. Indeed, the Ghost explicitly urges Hamlet to exact revenge:
Revenge his foul and most unnatural murder.
Hamlet doesn't need a second invitation; he has now determined the course he must follow—he'll see to it that Claudius will pay for his crimes. And although Hamlet will take quite some time exacting revenge, he knows what must be done, however long it takes.