In my book New York Times bestselling book Atomic Habits, I explain that the process of building a habit can be divided into four simple steps: cue, craving, response, and reward. The image below shows the habit loop and how these four factors work together to build new habits.
The cue triggers a craving, which motivates a response, which provides a reward, which satisfies the craving and, ultimately, becomes associated with the cue.