Charles Duhigg distills habit formation into a three-part loop: a cue that tells the brain which automatic pattern to run, a routine (physical, mental, or emotional) that follows, and a reward that signals the pattern was worth repeating. Over enough repetitions, the cue and reward become so tightly linked that a felt sense of craving or anticipation emerges in between them — and that craving is what actually locks the loop into place as a durable habit, not just repetition alone.
This framework matters practically because it relocates where change efforts should focus: trying to eliminate a routine directly, without addressing its cue or replacing its reward, tends to fail, because the loop's other two components are still fully intact and will keep generating the craving. Effective habit change generally works by keeping the same cue and reward while substituting a different routine in between.