How are you? is a very general question that invites the person to comment on whatever part of their current state is important. I would say the second definition is more accurate.
However, as Alan pointed out in the comments, this phrase is often used as a generic greeting. In those cases the question is not really seeking information, it's an expression of politeness and consideration for the other person. In those cases, it is polite to reply something like "fine" or "good", followed by "and you?".
It's a kind of complex phrase. Even as a generic question there is some room to provide a somewhat meaningful answer depending on how you actually feel, for example saying "I'm alright" if you're not doing so well, or "Great!" if you really feel good. It's impolite and off putting to respond very negatively or with too much detail, e.g. as in telling a stranger about your personal medical problems.
Moreover, the meaning of the question can become even more vague between people who know each other very well (well enough that a truthful answer would be appropriate). For example, if I see my brother and say "Hey, how are you?" I may or may not actually be interested in a truthful and explicit answer. This generally leaves it up to the person being asked to decide how much information they want to provide.
Other similar phrases can be used to indicate more of a generic greeting or more of an actual question. For example, I would say What's up? is more of a greeting, and usually doesn't even require an answer. On the other side, How are you feeling? is more explicit in seeking an actual answer from the person about how they are feeling.