Prefrontal cortex
The prefrontal cortex is the anterior part of the frontal lobes of the brain, lying in front of the motor and premotor areas. Cytoarchitectonically, it is defined by the presence of an internal granular layer IV (in contrast to the agranular premotor cortex). Divided into the lateral, orbitofrontal and medial prefrontal areas, this brain region has been implicated in planning complex cognitive behaviors, personality expression and moderating correct social behavior.
The basic activity of this brain region is considered to be orchestration of thoughts and actions in accordance with internal goals.
The most typical neurologic term for functions carried out by the pre-frontal cortex area is Executive Function.  Executive Function relates to abilities to differentiate among conflicting thoughts, determine good and bad, better and best, same and different, future consequences of current activities, working toward a defined goal, prediction of outcomes, expectation based on actions, and social "control" (the ability to suppress urges that, if not suppressed, could lead to socially unacceptable outcomes).
Many authors have indicated an integral link between a person's personality and the functions of the prefrontal cortex.

# Anatomy
Shown below are images of the prefrontal cortex depicting Brodmann area 10.
- Animated image of the prefrontal cortex
- Anterior view of the prefrontal cortex
- Lateral view of the prefrontal cortex
- Posterior view of the prefrontal cortex

# Brain linkages
The prefrontal cortex has a high number of interconnections both between the brainstem's Reticular Activating System (RAS) and the limbic system.  As a result, the centers in the prefrontal cortex depend significantly on high levels of alertness, and emotional linkages with deeper brain structures related to control of pleasure, pain, anger, rage, panic, aggression (fight-flight-freeze responses), and basic sexual responses.

# Studies
The classic case of earlier studies of prefrontal cortex function involved a railroad supervisor of constructionone Phineas Gagewho in 1848, despite a metal rod piercing his left cheek and exiting the top of his head, survived the incident and healed.  After the event he had normal memory and abilities to walk and talk, but because of the prefrontal injury could no longer behave correctly, often getting into fights or acting shockingly.  The remainder of his life was a tragedy of knowing what was right and wrong, but never choosing the right and instead always picking what sounded pleasurable and easy.
Subsequent studies on patients with prefrontal injuries have shown that, in testing, they verbalize what the most appropriate social responses would be under certain circumstances, yet when actually performing, they will still pursue behavior which is aimed at immediate gratification even if they know the longer term results will be self-defeating.
This data indicates that not only are skills of comparison and understanding of eventual outcomes harbored in the prefrontal cortex, but that the prefrontal cortex (when functioning correctly) controls the mental option to delay immediate gratification for a better or more rewarding longer term gratification result.  This ability to wait for a reward is one of the key pieces that defines optimal executive function of the human brain.
In 2005, University of Toronto researchers traced the origin of fear memories to the prefrontal cortex.

# Other disorders
In the last few decades, brain imaging systems have been used to determine brain region volumes and nerve linkages. Several studies have indicated that reduced volume and interconnections of the frontal lobes with other brain regions is common in those with depression, people subjected to repeated stressors, suicide victims, incarcerated criminals, sociopaths, and drug addicts. It is felt that at least some of the human abilities to feel guilt or remorse, and to interpret reality, lie in the prefrontal cortex.