When first learning a motor task, movement is often slow, stiff and easily disrupted without attention. With practice, execution of motor task becomes smoother, there is a decrease in limb stiffness, and muscle activity necessary to the task is performed without conscious effort. 
Muscle memory encoding
The neuroanatomy of memory is widespread throughout the brain; however, the pathways important to motor memory are separate from the medial temporal lobe pathways associated with declarative memory. As with declarative memory, motor memory is theorized to have two stages: a short-term memory encoding stage, which is fragile and susceptible to damage, and a long-term memory consolidation stage, which is more stable.
The memory encoding stage is often referred to as motor learning, and requires an increase in brain activity in motor areas as well as an increase in attention. Brain areas active during motor learning include the motor and somatosensory cortices; however, these areas of activation decrease once the motor skill is learned. The prefrontal and frontal cortices are also active during this stage due to the need for increased attention on the task being learned.
The main area involved in motor learning is the cerebellum. Some models of cerebellar-dependent motor learning, in particular the Marr-Albus model, propose a single plasticity mechanism involving the cerebellar long-term depression (LTD) of the parallel fiber synapses onto Purkinje cells. These modification in synapse activity would mediate motor input with motor outputs critical to inducing motor learning. However, conflicting evidence suggests that a single plasticity mechanism is not sufficient and a multiple plasticity mechanism is needed to account for the storage of motor memories over time. Regardless of the mechanism, studies of cerebellar-dependent motor tasks show that cerebral cortical plasticity is crucial for motor learning, even if not necessarily for storage.
The basal ganglia also play an important role in memory and learning, in particular in reference to stimulus-response associations and the formation of habits. The basal ganglia-cerebellar connections are thought to increase with time when learning a motor task.