A learned behavior that has become automatic. A habit forms when a subject begins to associate a particular behavior with an outcome that the subject desires. Because the outcome is rewarding, the subject will begin to repeat the behavior until it becomes automatic.
Habits are learned as the result of a habit loop.
The process of a subject deliberately repeating behavior in order to encourage the brain to accept it as a habit is called chunking.
Evolutionary Explanation of Existence
Habits exist due to the evolutionary advantage they enabled. Complex thinking, which takes place outer layers of the brain, requires a greater amount of energy and attention than habitual routine. Therefore, when a subject has repeatedly engaged in behavior that has proven to be rewarding, the brain essentially ‘automates’ the behavior in order to cut energy and attention consumption while ensuring that the desirable outcome continues to occur.
The Power of Habit by Charles Duhigg