The primary motor cortex is on the posterior part of the frontal lobe, and it contains most of the upper motor neurons. Most of the axons of these upper motor neurons will form two tracts: the corticospinal tract, which connects to the spinal cord, and the corticobulbar tract, which connects to the brainstem.
The map of the body on the primary motor cortex is called the motor homunculus, with the face and arm laterally, the torso superiorly, and the leg medially. The primary motor cortex and the primary somatosensory cortex are adjacent, and their homunculi are similar, so that lesions often involve both and cause similar patterns of body part involvement for upper motor neuron and somatosensory abnormalities. Anterior to the primary motor cortex are association motor cortices. Association motor cortices create the motor plan, which specifies which muscles to contract and at what intensity and duration. Then it sends the motor plan to the primary motor cortex for execution via the upper motor neurons. The motor cortices need input from other areas for proper function, including sensory cortices (particularly somatosensory and visual), the cerebellum, and the basal ganglia.
Motor planning is related to praxis, which refers to the ability to perform learned purposeful movements. Dysfunction of association motor or somatosensory cortices may cause apraxia, which is the inability to perform learned purposeful movements, despite having the necessary motivation and basic motor and sensory functions. A common example is losing the ability to operate a television remote control despite wanting to change the channel, being able to see and feel the buttons, and being able to move the fingers. Praxis can be tested by asking the patient to pretend to do tasks such as hammering a nail or brushing teeth. There is a type of hypertonia called paratonia that probably is a form of apraxia. Patients with paratonia seem to be unable to relax their muscles voluntarily; the more attention they pay to trying to relax the muscles the more contracted they become, but with distraction the tone usually returns to normal. This is usually seen with lesions of frontal association cortices that probably play a role in controlling the motor cortices.
There is an additional cortical area called the frontal eye field, which has a motor function for control of eye movements. It is on the lateral frontal lobe anterior to association motor cortices.