The nucleus of a habit consists of three parts.
It begins with a Cue — the trigger (a time of day, a certain place, the presence of certain people, a particular emotion) sending a message to your brain to switch on the automatic mode.
Next is the Routine — the habit or behavior itself, which can be psychological, emotional, or physical.
Last is the Reward — what tells the brain to reinforce this process in the future, the next time the cue is triggered.