What are attitudes?
There are only a limited stances or attitudes a being can have towards each other in the Pathfinder and d20 rules. This list is displayed under the definition of the skill as well as in Ultimate Combat under performance combat.
How this is determined, is often based upon a combination of the creature's entry in the Bestiaries (for example the Pegasus), campaign notes or the performance combat rules (for crowds). In the end, it is a GM choice based on circumstances and player behavior/attitude.
As a rule of thumb, most animals and humans are indifferent if the PCs (or other humans) haven't done something, while aberrations often are hostile.
It should be noted, that the GM does not need to inform the player about the attitude of an NPC and thus the DC of Diplomacy rolls, but often enough it is clear or just requires a simple spot motive roll.
What do attitudes mean?
Now, here things get a bit problematic, as they largeway go into the GM-Fiat-Land[Rule #0], and there are many places the attitude plays a role in Pathfinder - actually all the social interactions hinge on it, and they determine if an encounter is handleable with words (unfriendly and better) or demands a combat (hostile).
First of all, it should regulate the general behavior of an NPC to the (N)PC it has this attitude towards. A hostile being will attack, an unfriendly dog will bark or growl while an unfriendly guard might fine or arrest you for minor things, as long as you don't look like you'll question his authority and resist. An indifferent shopkeeper will not grant a discount, as that would harm his business. A friendly guard will give a warning after a tiny misdeed and protect you (as this is his job), but he might also arrest you because it is "best for you". A helpful ranger might share his prey with the hungry PCs without asking for payment and take some larger inconvenience for doing this (angering his landlord for example).
This attitude should be reflected in the behavior of the characters, but it doesn't need to be the same for all interactions: Grumpy-Guard, unfriendly to everybody below or equal to him, is also a brownnoser and helpful to his superiors. Or Captain Carrot Ironfounderson is helpful to a point, that it becomes inconveniencing to let him help you.
A good help is this thread on the messageboards of Paizo. I quote:
[...](quoting from D&D3.5)
- Attitude | Means | Possible Actions
- Hostile | Will take risks to hurt you | Attack, interfere, berate, flee
- Unfriendly | Wishes you ill | Mislead, gossip, avoid, watch suspiciously, insult
- Indifferent | Doesn’t much care | Socially expected interaction
- Friendly | Wishes you well | Chat, advise, offer limited help, advocate
- Helpful | Will take risks to help you | Protect, back up, heal, aid
While D&D 3.5 as itself isn't a hard rule base for Pathfinder, it might be helpful for an aspiring GM to determine 'basic actions' someone is willing to perform based on it.
Now, where does this draw in rules wise?
There are a lot of feats, class features and spells that alter the attitude. One of the most prominent is charm person. All these usually pull from the attitudes above, but there are some applications besides these one can think of.
- Bartering comes to mind. Bartering could (depending on GM) be made as a bluff roll or a diplomacy roll, mainly depending on how you try to achieve it. The DC is just like the table tells. If you roll well enough, you might get that discount on the +1 sword you are so keen on.
- Performance combat clearly says what the crowd is willing to do: boo or cheer for you.
- You can intimidate people to act friendly - at least for a short time.
Something I haven't had yet looked into is one of the newer 'core' books: Ultimate Intrigue came out this April, and it is pretty much about social environments, at least judging from the index I looked on. Sadly it is not on the PRD at this time (Nov 2016), but what I got from skimming a few reviews tells me that the concept of a "social statblock" is in there, giving more pointers on how to approach people or what might result in which attitude they have to other characters, or how they behave in certain situations.
The rules in it can be found on the unofficial d20PFSRD however.
The attitude is meant to be a roleplaying hint about the standing or a NPC to others. Mainly for the GM its exact results are quite a lot GM-Fiat and just have to follow Rule #0 and Best JudgementTM.
- Rule #0: The GM is always right, his judgment about something is ultimate, even if this would be contradicting rules.
- GM-Fiat-Land: something that is vague in the rules and where the GM needs to determine things based on his Best JudgmentTM and Rule #0