Central to our ability to have behaviors adapted to environmental circumstances is our skill at recognizing and making use of the orderly nature of the environment. This is a most remarkable skill, considering that behaviorally significant environmental regularities are not easy to discern: they are complex, operating among multi-level nonlinear combinations of environmental conditions, which are orders of complexity removed from raw sensory inputs. How the brain is able to recognize such high-order conditional regularities is, arguably, the most fundamental question facing neuroscience. We propose that the brain's basic mechanism for discovering such complex regularities is implemented at the level of individual pyramidal cells in the cerebral cortex. The proposal has three essential components. (1) Pyramidal cells have 5-8 principal dendrites. Each such dendrite is a functional analog of an error backpropagating network, capable of learning complex, nonlinear input-to-output transfer functions. (2) Each dendrite is trained, in learning its transfer function, by all the other principal dendrites of the same cell. These dendrites teach each other to respond to their separate inputs with matching outputs. (3) Exposed to different but related information about the sensory environment, principal dendrites of the same cell tune to different nonlinear combinations of environmental conditions that are predictably related. As a result, the cell as a whole tunes to a set of related combinations of environmental conditions that define an orderly feature of the environment. Single pyramidal cells, of course, are not omnipotent as to the complexity of orderly relations they can discover in their sensory environments. However, when organized into feed-forward/feedback layers, they can build their discoveries on the discoveries of other cells, thus cooperatively unraveling nature's more and more complex regularities. If correct, this new understanding of the pyramidal cell's functional nature offers a fundamentally new insight into the brain's function and identifies what might be one of the key neural computational operations underlying the brain's tremendous cognitive and behavioral capabilities.