What is consciousness and how does it arise from brain activity? These questions have intrigued philosophers for centuries and neuroscientists for decades. Today consciousness is believed to be an emergent phenomenon linked to the complexity of neuronal interactions. Anesthesia is a unique tool to reversibly alter the state consciousness and study its mechanism. We investigate the effect of various anesthetics on neuronal interactions in local circuits and large-scale networks of the brain using electrophysiology and fMRI in animals and human volunteers. We find that selective changes in neuronal spike transmission, burst synchrony, interaction complexity, and spatiotemporal fluctuations occur during the transitions to or back from unconsciousness. In addition, computer simulations using an fMRI connectivity-based spin-glass model suggest that the conscious state may be associated with complex system behavior near criticality but the relevant data from anesthesia are conflicting and imply the need for further research.