It is interesting to note that 2500 years ago, some of the discoveries that are made today about the workings of the human brain, were already discovered.
In the Sattipathana Suta it is said that the brain works as follows:
1. External signals with various frequencies, come in contact with the sense tools like eyes, ears, nose, skin, etc.
2. These sense tools filter out only a limited portion of these frequencies i.e. we cannot hear light or see smells.
3. A signal with the received information is sent to the brain, which then compares the data received with a wealth of information in memory. This information is composed of all experiences that a person has in the past.
4. Based on this information, neurotransmitters are released which give us a certain sensation somewhere on the body.
5. An evaluation is given "good" or "bad" based on this sensation and we react in a certain way.
Humans, as opposed to animals, are in a unique position that they are able to choose to not react if they are aware of this process. They can learn to be equanimous with the sensations they feel and change their reaction. This is what the Suta is teaching us through Vipassana meditation.
http://www.allhealthworld.biz/vipassana.html