"Habits" tend to be simple and associated somehow with your body: addictions, the way you move, the way you talk, the way you dress, the things you eat. "Patterns" can be much more complex than habits. "Patterns" are less personal. For example, you might get along especially well with people who play tennis and tend to form friendships with such people. That would be a pattern, not a habit.