In Act 2, Scene 1, Macbeth is seeing things. He thinks he sees a bloody dagger floating. This occurs only moments before his attempt to murder Duncan as he sleeps:
Is this a dagger which I see before me,
The handle toward my hand? Come, let me clutch thee.
I have thee not, and yet I see thee still.
Art thou not, fatal vision, sensible
To feeling as to sight? Or art thou but(45)
A dagger of the mind, a false creation,
The vision of the dagger seems real, but Macbeth is hallucinating. He only thinks he sees a dagger. In reality, Macbeth's guilty conscience is causing him to see things that are not there.
Macbeth thinks the dagger is leading him or guiding him to where Duncan sleeps. He is obviously having second thoughts about murdering Duncan. He sees the bloody dagger just moments before he plans to murder Duncan. His imagination is over worked. His sense of dread and guilt are before him as he sees the bloody dagger floating in the air.