Habits are something that we all have.  It is a tendency to behave in the same way repetitively as we have done in the past.  Once the habit is established it is automatic.  Habits can be effective (walking, logical thinking) or undesirable (carelessness, smoking, biting nails).

Determination should be present prior to breaking a bad habit.   The bad habit should be given no scope for expression, so that it gets forgotten by disuse.  The new habit should be given good positive energy.   The energy served by giving up the bad habit should be used for the good habit and any other useful activity.