The prefrontal cortex, which is located in the frontal lobe of the brain, is primarily responsible for thinking, reasoning, and intelligence. It is involved in higher cognitive functions such as decision-making, problem-solving, planning, and self-control.