There are more things in heaven and earth, Horatio
Swear by my sword
Never to speak of this that you have heard. Ghost:
[Beneath] Swear by his sword. Hamlet:
Well said, old mole, canst work i' th' earth so fast?
A worthy pioner! Once more remove, good friends. Horatio:
O day and night, but this is wondrous strange! Hamlet:
And therefore as a stranger give it welcome.
There are more things in heaven and earth, Horatio,
Than are dreamt of in your philosophy.
Horatio and Marcellus, though advised against it, barge into Hamlet's conversation with his father's ghost [see SOMETHING IS ROTTEN IN THE STATE OF DENMARK]. Hamlet is a little unforthcoming with the news imparted by this spirit, who is still rustling about under the stage. So it's hard to figure what Horatio and Marcellus are being asked to keep quiet, though Hamlet and the burrowing ghost (a "pioner," or miner) insist.
Horatio, a model of rationality, is still having a hard time swallowing the whole business. Ghosts are not the sort of beings his "philosophy" easily takes into account. We know that Horatio is, like Hamlet, a student at the University of Wittenberg, a notable outpost of Protestant humanism. The philosophy he studies there is probably classical—a compound of ethics, logic, and natural science. The emphasis on everyday phenomena pretty much excludes speculation about talking ghosts.
Wittenberg, however, isn't just a place where sober-minded Horatios debate Aristotelian physics. In Christopher Marlowe's play of the late 1580s, Doctor Faustus, it is where the doctor lectures and, on the sideline, fraternizes with demons.