The film has a very ambiguous nature, in that it is never stated if the spirits of the Overlook Hotel are real, or just in Jack’s head. Except for one BIG clue: The ghost Grady lets Jack out of the Cooler he’s locked in.
This is significant because it is the first time the supernatural world directly effects the real world. Telling you, the audience, that the ghosts are in fact real.
Now, for the interesting part.
There are three characters in the story that have the “shining” (or psychic powers) Danny Torrence, Mr. Hallorann, and one of Danny’s parents. We know this because Hallorann tells Danny the shining is passed from generation to generation. Now, a lot of fans thought it was his mother Wendy, but until the ghosts manifest themselves, she seems to be completely in the dark about what’s happening.
The third character in the story with the “shining” is Jack. But he has no knowledge of the gift he has. Just like Hallorann also told Danny: “There are some folks out there who have it, but don’t know it, or don’t believe it.” This is why Jack sees the ghosts, and why he is susceptible to the Hotel telling him to murder his family.
This fact in the character of Jack Torrence is integral to the story of King’s “Doctor Sleep”.