We are creatures of habit! A habit is a pattern of behaviour which is usually done unconsciously. A lot of our habits serve a practical purpose such as how we lay the table, or reverse the car out of the drive. But there are other habits such as nail biting, smoking, or pulling hair which serve no purpose at all, except to the subconscious! They usually develop as a means of distraction from a feeling of anxiety. For example you may have changed jobs which involves going to regular meetings which you find particularly uncomfortable. As a result you start chewing your pencil to ease the anxiety. It then may turn into a habit as you find yourself doing it at home or in situations which are not stressful. It has then turned into an "empty" habit, as it now serves no purpose.
The first step in treatment is to become aware of the habit. Habits respond well to metaphor. If there is an underlying purpose to the habit, such as alleviating anxiety, then this also needs to be addressed otherwise the habit will simply be replaced by another habit.