When Macbeth sees the bloody dagger, he is moments away from killing King Duncan. Obviously, Macbeth is feeling the guilt of murderous actions he has not yet committed. Macbeth is preparing to kill King Duncan. He is preparing to murder him as he sleeps. The dagger he sees is some type of omen that the witches desire him to follow. The dagger leads to where Duncan is sleeping. Macbeth speaks to the dagger:
You guide me on the way that I was going,
And show me the instrument I was to use.
In a few moments, Macbeth will actually hold a bloody dagger as he murders King Duncan.
Macbeth is already feeling the effects of the murder. He is having hallucinations about the terrible act he is about to do. His guilt is overtaking his reasoning. The dagger represents the bloody course on which Macbeth is about to undertake.