The only reason you give in to a negative habit is that at that moment, the immediate satisfaction you get from giving in to your habit is more obvious and persuading to you than the long-term cost you'll pay by continuing your habit. When a person is in their youth they feel good. They feel indestructible. Problems like cancer, heart disease, sexually transmitted diseases, emphysema, etc. may all seem very far away and thus may not seem threatening. One cigarette isn't going to hurt. One candy bar isn't going to make me fat. One sniff won't kill me (It could). The truth that everybody needs to know is that habits are strengthened with one candy bar, one smoke, one sniff... When you do things as a teenager you are severely more likely to continue them as an adult. Your best chance to stop a negative habit is to stop yourself right now from taking that cigarette, candy, etc. From this moment on it will get increasingly more difficult to stop with time.
Without being aware of it, our minds may tend to focus on the immediate costs or benefits for a given choice. However, if we make a conscious effort to focus on the long term costs or benefits of that choice, we have the power to choose differently and possibly more wisely.
When you are presented with a decision and need the will power to refuse a bad choice, focus on the long term costs of that choice. For instance when driving by a frozen custard shop, force yourself to think of obesity, heart disease and diabetes. When offered a drug, force yourself to think of addiction, the financial costs, and harmful side effects whether its cancer, brain damage heart disease or death. If you do this on a regular basis, you will automatically start associating that choice with the long term costs instead of the immediate satisfaction. A frozen treat will no longer represent pleasure to you. It will represent obesity, heart disease and diabetes. A drug will no longer represent a pleasurable escape. It will represent an increase in your problems and a lifetime of addiction and harmful side effects. As a result these temptations may even become disgusting turn-offs for you.