This is when you regain consciousness, but the circuits that keep you from moving around while you dream are still engaged, and you can't move. Many times, it's accompanied by the sensation of an evil presence nearby, and/or a feeling of not being able to breathe. People report that it feels like something evil has climbed on their chest and is crushing them. This is probably the source of legends about night hags or witches, and is reflected in the word roots of "nightmare", merran being Anglo-Saxon for "to crush".
I've had this experience a couple times, though I didn't have any of the "evil presence" -- just total paralysis, plus an inability to breathe properly. Scary enough on its own, even when you kind of know that it's just a brain glitch!
Anyway, there's a really interesting page about it, plus a survey for people who have experienced it, here: http://watarts.uwaterloo.ca/~acheyne/S_P.html. There are a lot of unfortunate formatting issues, but some really interesting information, along with the survey.
The stuff I thought was really interesting is the hypothesis that this might be related to the reflexes that most mammals have that make them freeze up when a predator is nearby (because it makes you harder to see) and the cataplexy response that makes a creature go totally limp when it's been grabbed by a predator -- because often that will result in it momentarily relaxing its grip, as the prey goes "dead". That's where the "evil presence" comes from -- a piece of legacy code in the lower levels of your mind that interprets signals from the still-dreaming parts of your brain as indicating a big, dangerous predator that's going to pick you up in its mouth and try to eat you. Neat stuff.