Early in the novel, Lockwood is sleeping in Catherine Earnshaw's old room when he has a dream a branch is knocking at the window. However, when he breaks the glass in the dream and tries to grab the branch, he finds he is holding Catherine's "icy cold" hand. When he sees her ghostly form trying to get in, he says that "terror" makes him "cruel," and he rubs her wrist on the broken glass to get free of her. The ghost then cries,
It is twenty years ... twenty years. I’ve been a waif for twenty years!
Eventually, Lockwood cries out, which arouses Heathcliff. Heathcliff is furious that Lockwood is sleeping in Catherine's old room, and when Lockwood is sent from the room, he overhears Heathcliff calling out longingly to Catherine.
The story is significant because Lockwood does not know Cathy's story yet: all he has done is read a few diary entries that show that Cathy and Heathcliff were abused by Hindley. Lockwood doesn't know about Catherine dying young, falling in love with Heathcliff, or asking in a dream that she be thrown out of heaven to roam the moors after she dies.
His dream, therefore, suggests that she really is a ghost haunting the moors, as it aligns closely with a story Lockwood does not know and so cannot be subconsciously reenacting. The dream also shows us a cruel edge to the seemingly friendly Lockwood. Further, Heathcliff's reaction is our first hint of the tragic aspect of his adult relationship with Catherine.