To understand the nature of consciousness, it is necessary to forego the notion that we are either conscious or unconscious. Some consciousness "stuff" does not suddenly get added to our other brain functions, and we are conscious. Rather, consciousness emerges gradually from the "mindlessness of a slug". In humans, neurologists recognize levels of consciousness from minimally conscious states to full consciousness. Let me illustrate this phenomenon with a couple of examples.
A famous case from the philosophical literature is that of the long distance truck driver. Think of yourself driving a truck at night for hundreds of miles along an interstate highway. Suddenly you realize that you have been driving all that distance without being aware of what you have been doing. You have no memory of the past hours. Yet during all those miles, you did not hit the median barrier, drive off the road at some unknown exit, nor did you fall asleep. But were you conscious? From a neurologist's point of view, you were conscious enough to manage successfully all the curves in the road but your level of consciousness was not high enough for full awareness of what you were doing.