The Habit Loop
Habits can be broken down into four steps:
Cue: The cue is anything that predicts a reward and triggers the response. It tells your brain to go into automatic mode and which habit to use.
Craving: The craving is what motivates every habit. We crave the change in state that the habit provides, and not the habit itself.
Response: The response is the actual behaviour that makes up the habit, which can be physical, mental, or emotional. Whether the response occurs depends on how much friction is associated with the behaviour.
Reward: The reward is the benefit that comes from the routine. It helps the brain figure out if the particular habit is worth repeating.
The cue is about noticing the reward and triggering a craving. The craving motivates a response to obtain a reward. The reward satisfies the craving tells us if the habit was worth repeated. The reward ultimately becomes associated with the cue.
References
Atomic Habits by James Clear
The Power of Habit by Charles Duhigg