The hypnagogic state is the condition the human mind reaches shortly before sleep. It is similar to REM sleep in that it is often bizarre and nonsensical, though it is far shorter and less directly related to the subconscious mind than REM sleep is. It prepares the mind for REM sleep.
Basically what happens during this state is that random images and thoughts float through your mind, sometimes related to recent events but mostly just really random strata. Whether you fall asleep within 30 seconds of getting into bed or you need an hour to go to sleep, your mind will eventually pass through the hypnagogic state, for however brief or long a time. Light sleepers often linger in this state, as it is easily interruptable by outside stimuli and isn't actually normal sleep.
Unlike sleep, your mind is really powerless during this state -- you can't dream or get the rest your mind needs at this time. Lucid dreams, or dreams where the mind wakes up and realizes it's dreaming while the body remains asleep, also cannot occur during this state. What happens is more or less just your mind channel-surfing along the proverbial UHF channels of the mind, only past channel 80 -- snow, static, random images, snippets of conversation, voices, etc.
The hypnagogic state is also related to schizophrenia. See the connection? The only difference is that a schizophrenic is fully awake for the ride, whereas the nearly-asleep person is barely conscious of what they're perceiving.
A similar mental phase, the hypnopompic state, occurs when the body and mind are in the process of waking up after having slept for a few hours. Pretty much the same things happen then. Both can be highly fascinating if you can train yourself to be aware of what's going on during these states, much like you can train yourself to dream lucidly or control your dreams.
Astral Dynamics by Robert Bruce
Adventures Beyond the Body by William Buhlman