It means the way you are thinking (your mentality, your outlook, your perception) is disagreeable. If someone says that to you, yes you have a problem.
In your example, "attitude" has a negative implication. However, in most other cases "attitude" is neutral. To clarify which kind of attitude, you need an adjective: good attitude, bad attitude, devil-may-care attitude, etc.
"The attitude of many people towards a change in lifestyle is..." simply talks about how people will approach, think of or react to a situation. This is a neutral example.