Self-control—or the ability to subdue one's impulses, emotions, and behaviors to achieve long-term goals—is what separates modern people from their ancient ancestors and the rest of the animal kingdom. Self-control is primarily rooted in the prefrontal cortex—the planning, problem-solving, and decision making center of the brain—which is significantly larger in humans than in other mammals.
The richness of nerve connections in the prefrontal cortex enables people to plan, evaluate alternative actions, and ideally avoid doing things they'll later regret, rather than immediately respond to every impulse as it arises.
The ability to exert self-control is often referred to as willpower. It allows people to direct their attention despite the presence of competing stimuli, and it underlies all kinds of achievement, from school to the workplace. It benefits relationships as well.