Action selection and execution are hard problems that the brain has to solve in our everyday life. Our ability to acquire skills for the execution of complex motor actions and to switch our behavior in a flexible manner, in order to reach specific goals, are essential functions for survival. Inability in the acquisition or execution of complex motor skills as well as inflexibility in sifting from previously learned habits are malfunctions that have been associated with a wide range of neurological and psychiatric disorders including Parkinson’s disease, obsessive-compulsive disorder (OCD), Turret syndrome and addiction. Identifying the brain regions and understanding the neuronal mechanisms involved in the acquisition of new skills and the transition from goal-directed to habitual behaviors is essential for the development of new strategies for the treatment of this neuropsychiatric disorders. My foremost aim is to understand the neural mechanisms that control the formation of motor skills and the transition from a flexible goal-directed behavior to fixed habitual actions.