Where does action based on thought originate within the human brain?
There are many areas of the brain that are associated with planning complex behavior. This is because planning and executing are mediated by the brain's capacity for executive functioning, and EF is further associated with many areas of the brain -- in this case, the the frontal lobes, the prefrontal cortex, the caudate nucleus, and the putamen all seem to play a role.

What typically happens is that a thought is formed ('I'm hungry, I want a cookie', etc.), and then potential actions are envisioned and evaluated for their predicted effect, in line with the common coding theory of the relationship between perception and action. From a functional standpoint, the caudate nucleus selects the appropriate action based on an evaluation of the outcome of the action. [1] [2]

The more complex the task, the more cognitive strategies you may need to use, and these are mediated by your executive functioning ability. Cognitive shifting or task switching, information updating and monitoring ("updating"), and inhibition (or the 'tuning out' of irrelevant stimuli) all play a role in planning and executing complex tasks, or sequences of behavior. [3] For example, the ability to act in momentarily unpleasant yet beneficial ways (i.e. going to the gym) requires cognitive inhibition of more immediately gratifying, yet irrelevant stimuli (i.e. sitting on the couch, eating pleasurable food). For tasks of this nature, the frontal lobe plays a greater role.

Certain neurotransmitters also play a role in your ability to stay focused and dedicated to a task. Dopamine in particular is responsible for motivation (including the motivation to act), and norepinephrine is responsible for vigilance of attention, thus increasing the likelihood that an action will be performed and completed successfully. With a reduction in these neurotransmitters, you may demonstrate attentional shifts. Long-term, uncontrollable shifts in attention are often representative of an underlying disorder, such as attention-deficit disorder.



Sources used:

[1] Grahn, Jessica; John A. Parkinson; Adrian M. Owen (12 April 2009). "The role of the basal ganglia in learning and memory: Neuropsychological studies". Behavioral Brain Research 199 (1): 53–60.

[2] Oury Monchi, Michael Petrides, Antonio P. Strafella, Keith J. Worsley, Julien Doyon (Feb. 2006). Functional role of the basal ganglia in the planning and execution of actions. Ann Neurol. 59(2): 257–264.

[3]  Miyake A1, Friedman NP, Emerson MJ, Witzki AH, Howerter A, Wager TD. (Aug. 2000) The unity and diversity of executive functions and their contributions to complex "Frontal Lobe" tasks: a latent variable analysis. Cogn Psychol. 41(1):49-100.