The higher cognitive functions, working memory, mental imagery and willed action, are all intimately associated with consciousness. The common process underlying all these functions is that information is "held in mind" for a period of time. This information, which may be about stimuli or responses, can be derived from the past or generated for the future. Brain imaging studies show that "holding something in mind" is associated with activity in an extended system which involves both prefrontal cortex and more posterior areas whose location is determined by the nature of the information being held in mind. Automatic actions and perceptions which do not involve consciousness are associated with activity in the relevant posterior areas, but not in the prefrontal cortex. These studies demonstrate that activity occurs in the same posterior area whether the associated information comes from the outside world or is internally generated. This raises the problem of how we know whether our experience derives from mental imagery or from something happening in the outside world. There is evidence that patients with schizophrenia have precisely this problem since they perceive their own thoughts and even sub-vocal speech as coming from outside (hallucinations). Recent brain imaging studies suggest that there is a disconnection between prefrontal and posterior areas in these patients which could explain their characteristic misperceptions.