Making a habit involves three elements – a cue, a routine and a reward. Take a habit like smoking, which has a chemical cue coming from the brain which tells you that it needs nicotine, a routine forms, like going for a smoke after you finish a class, or a task at work or after a meal, and your brain gets the reward of the nicotine, which is both a stimulant and a relaxant.
To break a habit you need to firstly identify the routine and understand the cue and reward, i.e. why do I do what I do? The next stage is to try to find a different reward to replace the original one, in this case nicotine, so maybe try exercising and/or another way of relaxing to find out is it the stimulation or relaxation you crave. Or maybe it is the social aspect of going out for a smoke with a friend – whatever you discover the reward is, is what needs to be replaced, so maybe have that chat with a friend at another time?
Then you need to isolate the cue – in the case of smoking it is a chemical addiction which needs to be replaced, so this might involve nicotine replacement patches or gum or just going “cold turkey” and trying to ignore the craving, which works for a lot of people, but not everyone. Finally, you need to have a plan to do the three previous steps, so maybe write down that you are going to go for a jog at a certain time of the day when you would normally feel the biggest urge to smoke, and then stick to it.
It sounds easy in principle, but giving up a habit, particularly something as addictive as smoking is one of the hardest things you might ever do and involves a lot of hard work and probably over a longer time than 5 minutes, unfortunately.