TO develope a full understanding of how the mind works I would have to take you on as a student over a period of years. I've taken several psychology and biology classes so I know some basics about how the mind works.
The mind "works" through cell signaling, where one neuron (the cells in your brain that are important, glial cells are lame) passes a signal through an axon to another neuron. This comes basically in two parts, an electrical phase and a chemical phase. The electrical part of the signal happens by means of an exchange of ions through a membrane. (I believe they are Na, K, Cl, and Ca, but not sure on the last two) They normally sit on seperate sides of the membrane, but when a signal passes through, they react with enzymatic gateways, which open and close the flow of ions. This happens in little cases called the mylon sheath, which you can think of like switches, when one is on, the next one down detects this and opens. This makes ion channels move very quickly. The longer the mylon sheath cell is, the faster the signal travels. (Sadly you can't make these cells bigger. Octopi have the largest, meaning they think "fastest" out of any animal, plants don't have nerves.) When the ion channel reaches the end of the neuron's axon pathway, they trigger enzymes to release neurotransmitters across a synapse. A neurotransmitter is simply any atom, or molecule that travels from one cell to trigger an effect on another cell. This travels across the synapse to activate a Dendrite of another cell. (Dendrites are the entrance, axons are the exit. Pretty simple, cells can have many dendrites but only one axon.) Ok, to look at a larger picture, your senses each take in some form of source, be it a molecule bonding with a protienic membrane receptor or some form of movement detection; they take these sources and transform them into...

Neurotransmitters! Depending which sense these neurotransmitters come from they can follow a path of neurons into the deeper parts of the brain. First off the sense would got towards the back of the brain (sight is in the back) and be translated into whether the sense is good or bad. (Harmful or not, and given a simple tag-like notice that is the sense itself) It it much like a computer in which the signal narrows down what the input is by determining which pathway it takes throughout the brain. After this first basic recognition, which is done without thinking, and is simply telling our body that something is there; the signal gets transferred to other parts of the brain. If we have encountered this peice of information in the past it goes towards the cortex. (I believe, I don't remember where exactly it is.

) Where it determines whether our past experience with this item was good or bad. (Probably many other things as well, it is how we relate one thing to another, roughly speaking.) Then the message gets sent to two parts of the brain which trigger emotions, emotions meaning not simply crying, but any basic feeling we get. These are located kinda in the center of the brain off to either side slightly. If the brain needs to act because of some input of some sort, then we would focus on the cerrebellum, which controls the movement of muscles. If the signal tells us that we are scared or have some sort of other problem, signals are sent to the thalamus, and hypothalamus. These can release hormones, which go thorughout the body and stimulate other responses. (Except in epinepherine and norepinepherine, which trigger the fight or flight response, and happen through an electrical signal as well as hormonal) Ugh I know I know more on this, but thats about as far as I remember right now.