A Habit is an action usually done in response to an impulse. Hence, a Habit also means an action performed repeatedly and automatically with limited awareness.
Habits require the pre-existence of impulses that are repeatedly validated and maintained first. In the absence of an impulse, a habit cannot be formed.