Complex behavior entails a balance between taking in sensory information from the environment and utilizing previously learned internal information. Experiments in behaving mice have demonstrated that the brain continually alternates between outward and inward modes of cognition, switching its mode of operation every few seconds. Further, each state transition is marked by a stereotyped cascade of neuronal spiking that pervades most forebrain structures. Here we analyzed large fMRI datasets to demonstrate that a similar switching mechanism governs the operation of the human brain. We found that human brain activity was punctuated every several seconds by coherent, propagating waves emerging in the exteroceptive sensorimotor regions and terminating in the interoceptive default mode network. As in the mouse, the issuance of such events coincided with fluctuations in pupil size, indicating a tight relationship with arousal fluctuations, and this phenomenon occurred across behavioral states. Strikingly, concurrent measurement of human performance in a visual memory task indicated that each cycle of propagating fMRI waves sequentially promoted the encoding of semantic information and self-directed retrieval of memories. Together, these findings indicate that human cognitive performance is governed by autonomous switching between exteroceptive and interoceptive states. This apparently conserved feature of mammalian brain physiology bears directly on the integration of sensory and mnemonic information during everyday behavior.