Several years ago, I bought a smartphone and soon came to love it. Being able to send an e-mail, look up a fact, or buy something no matter where I was meant a previously unimaginable gain in productivity. Every time I got an e-mail, the phone emitted a ping and I would deal with whatever it was, priding myself on my efficiency. Texts arrived with the tones of a French horn and were similarly dispatched. Soon, I was reaching for the device every time it made a sound, like Pavlov’s dog salivating when it heard a bell. This started to interfere with work and conversations. The machine had seemed like a miraculous servant, but gradually I became its slave.

I’d always prided myself on my will power. Like most people who’ve made it through medical training—with its early mornings and its long shifts when your friends are partying—I had an established track record of delaying gratification. It didn’t matter. When I tried switching the phone to silent, I ended up checking it perhaps even more often, just in case there was something to deal with. The only time I managed to resist was during Shabbos, when I don’t read e-mail. But I’d be watching the clock, counting the hours till I could turn the thing on. For the first time, I could imagine what it’s like to be a smoker craving a cigarette. Checking the smartphone had become a bad habit that I couldn’t break.

Habits, good and bad, have long fascinated philosophers and policymakers. Aristotle, in the Nicomachean Ethics, surveyed existing notions of virtue and offered this summary: “Some thinkers hold that it is by nature that people become good, others that it is by habit, and others that it is by instruction.” He concluded that habits were responsible. Cicero called habit “second nature,” a phrase that we still use. And when Alexander Hamilton, in Federalist Paper No. 27, considered how to create citizens who would obey the federal laws of the newly formed republic, he used another proverbial phrase: “Man is very much a creature of habit.” If federal law permeated matters at the state level, it would seem part of everyday life. “The more it circulates through those channels and currents in which the passions of mankind naturally flow, the less will it require the aid of the violent and perilous expedients of compulsion,” he wrote.

In the modern era, habits have become a significant area of scientific inquiry. Psychologists have explored the genesis of habitual behavior and its impact on health and happiness. William James, echoing Aristotle, wrote, “All our life, so far as it has definite form, is but a mass of habits,—practical, emotional, and intellectual . . . bearing us irresistibly toward our destiny.”

Few of us like to think of ourselves in such passive terms. What about will power? Marketers flatter our sense of agency with slogans like “Just Do It” (Nike) and “Declare Your Path” (New Balance). Much popular psychology, too, bolsters our belief in self-control. In the famous Stanford marshmallow experiment, devised by Walter Mischel, in the nineteen-sixties, children were seated alone in front of a marshmallow and were scored on whether they resisted gobbling it down. The resulting determination of a child’s level of “executive function” supposedly distinguishes life’s winners and losers, predicting such things as performance on the SAT, duration of relationships, and career success. But how can that be, if we’re just creatures of habit?

In “Good Habits, Bad Habits” (Farrar, Straus & Giroux), the social psychologist Wendy Wood refutes both James’s determinism and glib exhortations to be proactive, and seeks to give the general reader more realistic ideas for how to break habits. Drawing on her work in the field, she sees the task of sustaining positive behaviors and quelling negative ones as involving an interplay of decisions and unconscious factors. Our minds, Wood explains, have “multiple separate but interconnected mechanisms that guide behavior.” But we are aware only of our decision-making ability—a phenomenon known as the “introspection illusion”—and that may be why we overestimate its power. The executive functions that make will power possible give us, she writes, “the sense of agency that we recognize as ‘me.’ ” But that comes at a cost in terms of effort. To go about our lives, we need to make some behaviors automatic.

Functional MRI scans have given researchers a peek into the respective neural networks that are active during rote and conscious tasks. A brain scan of someone learning a task shows activity in the prefrontal cortex and the hippocampus, networks associated with decision-making and executive control. With repetition of a task, brain activity moves into areas of the putamen and the basal ganglia, deep in what Wood calls “the rudimentary machinery of our minds.” There, a task is turned into a habit.

These more primitive areas of the brain demand less of our mental energy. Whole sequences of actions become linked, a process known as “chunking.” When we get into a car and drive off, we don’t need to think about the separate actions of buckling a seat belt, turning on the ignition, putting the car in drive, checking the mirrors and the blind spot, and pressing the gas pedal. All these steps, chunked into a single unit in the memory, are triggered by the environmental cue of getting into your car. This frees us up to concentrate on what most requires conscious attention. We can think about where we’re going or the day’s tasks, and keep an eye out for anything unusual on the road.

Wood’s research originally focussed not on habits but on persistence. For “one-off, occasional behaviors,” like getting a flu shot, conscious decisions were all that was required. For behaviors involving repetition, though, habits were crucial. William James estimated that “ninety-nine hundredths or, possibly, nine hundred and ninety-nine thousandths of our activity is purely automatic and habitual.” This was a guess; Wood, however, devised a study to quantify just how often people act out of habit. Using a research technique known as experience sampling, she had participants spend two days recording what they did while they were doing it. Results varied across the groups studied, but the basic finding was that our actions are habitual forty-three per cent of the time.

This explains why conscious knowledge is not in itself enough to change behavior, and why public-health initiatives that educate people about healthy choices tend to fail. In 1991, the National Cancer Institute determined that only eight per cent of Americans were aware of the recommendation to eat at least five servings of fruit and vegetables daily. A national campaign was declared: 5 a Day for Better Health. Six years later, thirty-nine per cent of Americans knew about five servings a day, a nearly fivefold increase, but actual diets had barely changed. In 2007, government officials tried again, launching a program called Fruits & Veggies—More Matters. Even so, by 2018 only twelve per cent of Americans ate the recommended two servings of fruit daily, and only nine per cent ate three servings of vegetables. Simply informing us of what’s good for us doesn’t work, because so much of our eating, cooking, and shopping is governed by habit.