Habit
A learned action that a familiar cue sets off automatically, with little thought. It's built by repeating the action in the same situation, not by intending to.
A habit is an action the brain has tied to a situation, so the situation alone starts it. Evidence: solid Do something in the same situation enough times and the brain hands it to a cheaper system: cue, action, done, with little deciding involved. Coffee when you sit down, phone when you're bored. Evidence: solid This is how the brain saves effort, and it saves it on good and bad habits alike. Evidence: solid
The "21 days" figure comes from a 1960 self-help book by a plastic surgeon, based on how long his patients took to get used to a new face, not a study. Evidence: decent In the best-known study, new habits took anywhere from under three weeks to most of a year to become automatic, with a middle of around two months. Evidence: decent
Why it matters
You don't beat a habit with willpower, because willpower is the expensive system and the habit is the cheap one. You change the cue, add friction, or put a different action on the same cue. Evidence: decent