Enchanted loom
The enchanted loom is a famous metaphor for the human brain invented by the pioneering neuroscientist Charles S. Sherrington in a passage from his 1942 book Man on his nature, in which he poetically describes his conception of what happens in the cerebral cortex during arousal from sleep:

The "loom" he refers to was undoubtedly meant to be a Jacquard loom, used for weaving fabric into complex patterns. The Jacquard loom, invented in 1801, was the most complex mechanical device of the early 19th century. It was controlled by a punch card system that was a forerunner of the system used in computers until the 1970s. According to the neuroscience historian Stanley Finger, Sherrington probably borrowed the loom metaphor from an earlier writer, the psychologist Fredric Myers, who asked his readers to "picture the human brain as a vast manufactory, in which thousands of looms, of complex and differing patterns, are habitually at work". Perhaps in part because of its slightly cryptic nature, the "enchanted loom" has been an attractive metaphor for many writers about the brain, and has supplied the title for several books, including the following:
 . Published 1985 in Spanish by Salvat, with the title "El telar mágico: El cerebro humano y el ordenador" (The magic loom : Human brain and the computer). See also
List of metaphors
Computational theory of mind
Mechanism (philosophy)
Strange loop

Notes

This was Sherrington's understanding in 1942. It is now known that the brain is much more active during sleep than he realized. References

Sleep
Consciousness
Metaphors
Philosophical analogies