The cells in our cortex are essentially machines ready to be influenced by the world as we are born. A blank slate, if you will. While there is some genetically programmed organization there from embryological development, all areas in the cortex pretty much do the same thing as far as pattern recognition (see YT video of Jeff Hawkins’ (On Intelligence, Hierarchical Temporal Memory)). What makes certain areas of our cortex perform different functions has more to do with which sense organs they are attached to than them having some intrinsic difference. The three-dimensional organizational structure of the cortex all over is responsible for higher and higher levels of recognizing and relating perceptual patterns. Our brains, more than any other animals', can abstract concepts from this “ocean” of perceptions, due to our exceptionally large cortex. We can do this by a unique way of considering more than just a few perceptions at a time. We group them into “concepts”, which allows for all versions of a specific type of perception to be considered with a word, such as first order concept “chair”. This is performed mentally by retaining only the essential characteristics and omitting the measurements, or possible different varieties, of these characteristics. We then attach a phoneme to this thought, and language is born. When the memory of a chair is recalled, it is recalled partly by stimulation of the same neurons, in the occipital cortex, which are stimulated when you actually see a chair as well as some in the auditory cortex responsible for storing the pattern of sound associated with “chair” and in the pre-motor cortex to speak it. These can be drastically different patterns from situation to situation, as the cortex relays this information to other neurons around, above and below, to higher “association” areas, which further organize this information. There are some neurons/groups of neurons which must be accessed, in order to think of, look at or talk about a chair. These neurons all attach to other areas which are stimulated by thinking of a “higher” order concept like furniture, as information travels “up” the organizational structure in the cortex, and also attach to other areas which are stimulated by thinking of or seeing parts of chairs, or the “lower” perceptual aspects of it, like the colors, shapes and lines, as the information travels “down” the organizational structure. So, as the concept of a chair “comes to mind”, it necessarily sends electrical signals to all those neurons it is attached to, as each neuron has thousands of dendtritic connections to other neurons. They store the sequences of stimulation molecularly and this is perceived by us as learning and memory. Every time any neuron is fired, so are many others. The direction of the flow of information is dictated by many factors. Many different areas of the brain are inputting to many other areas. The thought we perceive and execute comes from the strongest connections influenced by the goal one has been thinking of, the stimulation entering the brain, the memories that are already there and even the temperature in the room is a factor, albeit usually a very small one. There is not one set of thoughts occurring at any one time. There are always multiple groups of neurons being stimulated and not reinforced or reinforced a little or only a moderate amount, we only perceive the few our attention can handle. The ones outside of our "crow epistemology", or too many to focus on, 4 or 5 in humans (see Ayn Rand’s The Objectivist Epistemology), are simply what is traditionally referred to as our subconscious. The subconscious is not an alternate person or mysterious conscious made up of only your primal desires, it is simply all those other patterns that get stimulated but not enough to directly influence the flow of information noticeably. It is what remembers things wile you are not thinking of them. There is actually a lot of “thinking” that goes on without it gaining the full attention of one’s consciousness.
This process of electrochemical neurotransmission functions always as long as your brain is alive. Pattern recognition pathways are stimulated and the reinforced ones dominate and lead to decisions and actions. Those patterns that we like and repeat, say concerning what we want most out of life, or think about most strongly, get more and more related to new stimuli as it enters into our cortex. This process is affected, also, by other things, like, say what we are in the presence of or what we are thinking of at the time, which may or may not be similar to or anything like what we are ultimately interested in. In this way there is no single you that makes decisions and directs the flow of information in your brain. We all have specific identities of course, and for the purpose of functioning in the world, I am me, and my cortex thinks and acts in a certain way, different than all others. But, like Youtuber Nick, TheModernMystic, likes to say, “There is no ‘I’”. But, unlike Nick, I do believe that I exist, it is just that my identity lies inside my ever changing brain, this complex process of interacting pattern recognition stimuli. You cannot choose which information or patterns to call upon to make a decision, you must use yours. The illusion of freewill is there because it feels like we caused the decision magically. But this is not so. Each memory or electrochemical neural pattern must have been stimulated by another. No thoughts are created ex nihilo. There is only perceptions and how they interact with the stored information in the cortex that results in action and identity.