Psychologically speaking, it takes roughly 28 days to form a habit. This is where the neural pathways in the brain become used to the order of action and become more deeply grooved, as a piece of grass would if a cart were to roll over the same space day after day for the same length of time. After 28 days of doing the same thing every day, the habit is born, after that you don't have to think about it anymore, the habit just "runs" by itself. People with addictive personalities will form the habit before this time, those with stronger wills tend to take a little longer, but one full lunar cycle seems to be about the norm for most people.
To replace the bad habit with a good one, to start a good habit by itself, or simply to delete the bad one, can all be done in the same way, over a 28 day period.
The method is very simple, and really works. However there are two pre-requisites before setting out on this exercise.
1. You must really WANT to acheive the end result.
2. You must be prepared to do this mental exercise EVERY DAY for 28 days, at least once per day.
Assuming you have the above two stipulations in place, and you have the habit, let's take smoking for the sake of the example, we proceed as follows.
First we need to create a character from our imagination. This is easier than it sounds. Just think of a "type" of face that you would instinctively trust. For some this will be an elderly man with the experiences of the ages written in the wrinkles of his face. For others it will be a younger character, male or female. Whoever you decide upon, know their face in detail before you go any further. This person is completely trustworthy, and will never let you down under any circumstances. Once you have your character in place, give them a name. For our example, let's suppose we chose the old man, we'll call him "George". You can give your character a much more exotic name if you like.
Then, every day (preferably in the morning before the habit has had a chance to "run" for the day), find a quiet corner with no noise. Switch the TV or radio off, and sit quietly. Imagine yourself standing on the platform of a real train station. Try and imagine your own local station, as you will probably be able to recall the scene in some detail. Wait patiently for the train to arrive, try to engineer a sense of expectancy as you wait there. Hear the train in the distance, hear it being announced over the station tannoy system, and then watch as it pulls in to the station right in front of you. Walk over to the nearest window, and see it open.
In our example George is sitting in the train looking out of the window. Smile and greet your character warmly, after all, they are about to render you a great service. Now we simply hand over the habit to 'George'. In our example we hand him the cigarettes and lighter, ask him to take them away from you forever, and thank him for being such a good friend. (You can wrap your own bad habit up in a parcel and give it to your character).
When the train pulls out of the station, wave your character good-bye, and wave away your habit with them.
If you do this a couple of times every day for the whole 28 days, (continue the exercise for the whole of the 28 days even if you feel half-way through you no longer need to), you will begin to experience a sensation of lightness as the train pulls away each time. It is a feeling of being unburdened.
You can create new habits in exactly the same way, only this time "George" arrives with the habit in a parcel for you!
If you do this methodically for 28 days in succession, any habit can be broken, because subconsciously your mind will accept the vision of the habit departing as a biological fact. Physical cravings will lessen dramatically during the course, the brain will begin to accept "George" in the way it accepts an authority figure in real life, your subconscious will not be able to tell the difference.
It will also help if you mark the 28 days off on a calendar, or in a notebook, try it and see!