Back in 1957, a year before I was born, B.F. Skinner published a little book titled Verbal Behavior. In it he argued that human language was nothing but another behavior which was produced by operant conditioning, the kind of training he had demonstrated to turn pigeons into expert bombardiers, or make rats afraid of dark spaces.
Set against this was Noam Chomsky's book Syntactic Structures, which was published in the same year. In it, Chomsky argued that language was the product of a set of rules, called transformational grammars. To demonstrate his point he came up with this sentence: "Colorless green ideas sleep furiously."
It looks like a sentence that's been thrown together in a hurry. It uses two adjectives, plus an adverb. A good writer would put a bit more effort into it. "Racism had fallen asleep for the first time. I'll do this right, it thought to itself. Sleep is not to be done lackadaisically. So racism put all of its effort into the matter. Its hypothalamus was soon sparking, and the nucleus of the solitary tract quivered with excitement."
But of course, Chomsky's point wasn't the meaning of the sentence. His point was the rarity of the sentence. As I pointed out, a good writer would not have said it that way, but even a poor writer was highly unlikely to ever have said such a thing. This was owing to Chomsky's choice of words. He reasoned that words such as colorless and green would not be juxtaposed, and that such an insubstantial thing as an idea would not be associated with such material properties as a color, or lack thereof, not to mention both at once. Nor would ideas sleep. The activity of sleep had been associated with a variety of descriptors, including dreamlessly, deeply, fitfully, restlessly, restfully, etc, but fury, a state of intensely aggressive emotional arousal, was unlikely to ever have occurred to someone writing or speaking of sleeping.
Skinner was premising his book in part on Claude Shannon's theory of language, published in the 1948 paper A Mathematical Theory of Communication. Shannon had found that, given one word to start with, some words were more likely to follow than others. This was known as a Markov chain. Skinner thought that, as people grow from childhood, they hear the words spoken by the adults around them. These words establish for them the order in which the words are to be used, along with the sense they bear.
Chomsky's view of things was instead that, look if I can make a sentence that clearly no one has said before, then the process has to be something like a set of general rules that may be used to produce new stuff.
Chomsky's theory has since been expanded. Most brain anatomists believe that the human brain consists of discrete parts. To produce language, some bits of the brain are used to create grammatically correct sentences, while other bits map words to meaning. Some other parts are responsible for transporting the result to the muscles of the mouth, throat, and chest for speaking, or to the muscles of the hand for writing. Conversely, when understanding speech different areas of the brain decode the sound into phonemes, construct words, assign meanings from context, fit grammar, and finally arrive at a sense for the entire speech. Reading passes visual perception to areas responsible for decoding symbols to the parts that assign meaning without necessarily ever producing any sort of unheard speech.
This separation of brain ability is demonstrable in stroke patients. Depending on the location of the damage, such a patient may be unable speak or understand spoken language, or both, read or write, or both, retrieve particular words, remember the names of people or things, hear language, or comprehend music or complex conversations. Since these symptoms are consistent with the location of the damage from one patient to the next, language psychologists now divide language comprehension and language production into discrete tasks. Each of these tasks is hosted by a specific area of the brain, and when that area is damaged the ability to perform that task may be affected.
Chomsky believed that children who are learning to speak are merely activating these various areas in the way they've been wired together. Hearing sounds, the brain learns the range of phonemes that are important in language. Hearing words, a particular structure of the brain assigns meaning from context. Hearing sentences, other parts of the brain discover how the grammar works. A child doesn't need to first hear something before saying it. Instead the brain learns how to do its job for a given language, and then goes ahead and does it.
This of course leaves a number of problems unanswered.
For example, how does a child who speaks more than one language learn to distinguish them from each other? Bilingual children do not generally confuse which language they are using. A child speaking both Russian and Hebrew will not mix Russian words into Hebrew sentences, nor toss Hebrew words into a Russian sentence. Nor will the child speak using Hebrew words but Russian grammar, or using Russian words but Hebrew grammar. Also, while an adult who learns a new language speaks it without a foreign accent only with great difficulty, a bilingual child will speak each language with a native speaker's accent.
How is all this possible? Language theorists have to assume that the brain structures that support these functions can support multiple languages, as well, but it is difficult to see how the evolutionary history of the species can explain this ability. Most evolutionary psychologists suggest that these kinds of abilities, just like the ability to read or write or do complex math (which also use specific brain structures which arguably cannot have evolved for those purposes), use brain structures that originally supported some entirely different behavior. But it is an admittedly unsatisfactory cop-out, not much better than that used by the last adherents to Skinner's theory. In fact, while computer programs are being successfully used to understand and produce natural language using Markov chains, none yet manage it nearly so well using Chomsky's theory of language production.
So human language has some tantalizing explanations, but at this time large parts of it are still open to revision as new things are discovered.