Good and bad habits have a large impact on our lives because habits are actions that we repeatedly perform. We are what we do, over and over, again and again. You want to avoid bad habits because you don’t want to be repeating actions that harm your health, your finances, or your piece of mind. On the flip side, when you want to repeat something (like exercise), it’s best if you can turn it into a habit.
There are great books on habits, and it is a big topic, so it can't all be covered here. For now, let me just mention a few examples from my own life.
It is very easy to fall into bad habits, and it is hard to extinguish them once formed. For example, I started to eat dessert after moving in with a romantic partner. She had a sweet tooth. I prefer salty snacks in general, but it didn’t take long to develop a craving for sweets by eating dessert after dinner with her every day. This habit has lasted a long time. It’s a habit I have probably passed on to others in my life. It's not the worst habit to have (though it would be better to eat fruit after a meal). Still, it serves as a useful illustration of the influence our social network can have on our habits.
Our friends and loved ones pass a lot of habits onto us, so it is important to be careful about who you spend time with (for the record, my ex passed on many more good habits to me than bad ones). Someone once said that individuals are the average of the five people that they spend the most time with. If you hang around people who drink a lot, you will likely drink with them. This can become a bad habit (or worse an addiction). If you hang out with people that like to eat out a lot, you will probably eat out a lot too. If your friends abstain from drugs and alcohol, you are far more likely to abstain from these things. Choose the company you keep carefully.
For things that we are biologically predisposed to (such as eating sugar and high calorie foods), it requires little to no effort to repeat this behavior. When a something is easy to engage in, habit formation around that activity is easy. You should exercise caution around these sorts of activities. You want to make it hard to do things that are bad for you and make it easy to do the things that are good for you.
If you want to study more, lay your study materials out on your desk, so that you can just sit down and jump right into studying. If you want to avoid eating sweets after dinner, do not keep sweets in the house. If you must drive or walk far to get some dessert, you will likely skip it. Make laziness work in your favor.
For example, I have almost always worked out at home. I invested in a home gym over time, and it has paid off. It is easy to work out when you don’t need to drive anywhere to do it. I don’t even need to shower first. I also make sure that the workouts are very manageable, so that I don’t dread them too much.
Consistency is far more important than any other variable. Even if you did only three sets of exercise per body part, it is best to space the three sets out over three days than to perform the three sets all on one day. It's easier to commit to one set on a given day than to commit to three. You will probably feel like doing more after one set, but if not, at least you're keeping the habit going. The same goes for studying. A little bit of work done more often is always better than the same amount of total work done in one or two sessions.
Whenever possible try to turn a weakness into a strength. I have a little bit of OCD about checking items off a to-do-list. I love to check every item off the list. It bothers me when I can’t. This can be very motivating. Likewise, I have maintained a workout log in an Excel spreadsheet for over 17 years. Once per month, I plan out a month’s worth of workouts. The log has checkboxes for every workout that must be performed. This means that not only do I type in a record of what I performed during the workout, but once a workout is finished, I get to check off the box for that day. This little reward at the end of the workout has been enough to keep me at it for 17+ years. I can’t imagine failing to keep it going. It would feel like a terrible loss at this point to stop filling it out. I like to be able to say, “I have been working out consistently for more than 17 years.”
This is also a form of using peer pressure to motivate myself. I want to be able to tout my accomplishments, so I maintain the habit. I shouldn’t care what others think, but if talking about my habit creates a little bit of social pressure to keep up the work, it's a net benefit. Likewise, it can help to make a public proclamation that you’re going to do something. You won’t want to lose face, so you will try to accomplish what you publicly promised you would do.
For now, the last thing I will say is that you should forget about using willpower to develop a habit. Willpower can be developed. With practice, it can be made stronger, but willpower cannot be relied upon for long. Using willpower alone to stop performing a bad habit or to form a good habit is like trying to hang from a fourth-floor ledge using your grip alone. You may have worked hard to develop incredible grip strength, but hang there long enough, and eventually, you’ll fall.
Don't use willpower as a long-term strategy, you can rely on it in emergencies to stop yourself from engaging in an unwanted behavior, but it is best to design an environment at home, work, and elsewhere that avoids constant temptation. If you want to develop a good habit, do everything you can to make it easier to perform the desired activity. For example, set your retirement savings to automatically deduct from each paycheck. You won’t even notice the money has been ushered away into a retirement investment. Before you know it, you will be financially independent.