If I understand your question correctly you are referring to Act 1 scene 1 lines 149-158 of the play, Hamlet. Here Horatio is challenging the ghost of old Hamlet to speak. He leads the ghost with three superstitions that he has heard about ghosts.
His first superstition is that ghost return because they have unresolved issues. Horatio says “If there be any good thing to be done/ That may to thee do ease and grace to me,/ Speak to me.” He challenges the ghost to speak and tell him what he can do to ease the spirits pain and bring glory to his own name.
Horatio’s second superstition is that the ghost is there to provide a warning. Horatio says, “If thou art privy to thy country’s fate,/ Which happily foreknowing may avoid,/ Oh, speak!” Here with these lines he asks the ghost about the country’s fate in other words what warning can the ghost give.
The third superstition that Horatio references is the idea that ghosts may be attached to a treasure or a prized item to which the ghost is attached. Horatio again challenging the spirit to speak says, “Or if thou hast uphoarded in thy life/ Extorted treasure in the womb of earth,/ For which, they say, you spirits oft walk in death,/ Speak of it. Stay and speak!” In this example Horatio implies that the ghost may have a hoard, a mass of treasured items.
There are three very specific claims that Horatio makes concerning superstitions about ghosts. Each of which in some way are true to the play. The unresolved issue is his the old king’s murder, the ghost seeks revenge. The warning is that the new king, his brother is the murder. The treasure he is bound to is his wife. The ghost laments that she his virtuous wife is now married to his murderer.
1) It is a sign of some strange violence which is about to take place in their country.
2) Since young Fortinbras, who is on their borders, is eager to regain what his father had lost, he may try to begin a war.
3) It is a warning that disaster is coming.
1 - have a deed done to give peace to the ghost (and honor to deed - doer)
2 - provide knowleddge on the fate of the country (future)
3 - buried treasure that is keeping the ghost restless