Good habits can be hard to form and bad ones hard to break. If you understand the habit-forming process, you'll have an easier time making them work for you.
Writer Charles Duhigg shares the process with productivity and ideas blog the 99u. It basically boils down to this:
First, there is a cue, a trigger that tells your brain to go into automatic mode and which habit to use. Then there is the routine, which can be physical or mental or emotional. Finally, there is a reward, which helps your brain figure out if this particular loop is worth remembering for the future. Over time, this loop… becomes more and more automatic. The cue and reward become intertwined until a powerful sense of anticipation and craving emerges.
Want to exercise more? Choose a cue, such as going to the gym as soon as you wake up, and a reward, such as a smoothie after each workout. Then think about that smoothie, or about the endorphin rush you'll feel. Allow yourself to anticipate the reward. Eventually that craving will make it easier to push throughout the gym doors every day.
It's a simple process, but one the brain easily responds to. If you're looking to create some better habits, or dump some old ones, this is a very simple way to make those behavioural changes a lot easier.