Cognitive control supports intentional behavior by aligning neural information processing with internal goals. A key feature of cognitive control is its flexible self-adjustment based on the demand in the environment. However, little is known about the neural and computational mechanisms supporting this flexibility, or in other words, how cognitive control controls itself. In this talk, Jiefeng will present a series of studies trying to answer this question from the perspective of learning and memory. Jiefeng will also present his future research plan that extends this line of research to investigate how humans learn and perform complex tasks.