The motor cortex is located in the posterior part of the frontal lobe. It is involved in planning, controlling, and executing voluntary motor functions. Regions of the motor cortex correspond to different body regions, with more precise areas occupying larger regions. Key substructures include the posterior parietal cortex for transforming visual input into motor commands, the premotor cortex for proximal movement control, and the supplementary motor area for complex coordination. The posterior parietal cortex is located in the parietal lobe but is still considered part of the motor cortex due to its function of transforming visual information into motor commands.