The relations system is central to dealing with the various factions in the game. Each faction, NPC, and location has a separate relations score with you. The maximum relations score for all types of relations is ±100.
You have a relations score with each of the five factions (Swadians, Vaegirs, Khergits, Nords, and Rhodoks). This score affects how they respond to you. Parties that are neutral or friendly with you will aid you in battle and will allow you to freely enter their towns and castles. Attacking a faction's parties (including caravans but excluding Farmers) lowers your relations with them, including jumping into a battle and aiding their enemies. You can raise your relations by aiding them in battle or by attacking the parties of their enemies. You can view your faction relations at any time by clicking Reports and choosing the faction relations report. The terms used (accepting, indifferent, suspicious, hostile, resentful, etc.) indicate what they think of you, and the numbers show the exact scores.
Joining a faction automatically sets your relations with that faction to +12 and your relations with the faction(s) they are at war with to -40 (your relations with the factions they are at peace with will be unaffected). Taking up a claimant's cause will set your relation with the rebel faction to +90 and the original faction to -50. These numbers are set regardless of where your relations with those factions were before you signed up.
If your relation with a faction falls to -10 or below they will consider you an enemy and will attack you, even if you belong to a faction they are at peace with. You can restore negative relations by speaking to a leader and agreeing to pay a fine to atone for your crimes (this will generally cost thousands of denars); you do not get this option if the enemy leader is chasing you, so you will need to have the bigger party or else visit a leader resting at a location. If you are in a war with the faction, you don't get that option at all.
Each named NPC has his own relations with you. In the case of a party leader you can raise this by aiding him in battle, saving his fiefs from bandits, or doing faction quests; you can lower it by attacking him or his fiefs, angering him through dialog, or failing a quest he gave you. Your relations score with a king affects how likely he is to ask you to join his faction or agree when you ask, and also how likely he is to grant you fiefs (Renown helps influence both these decisions).
NPCs with a relation of 30+ consider you a friend and are more likely to support you in the assignment process of newly captured fiefs and are more willing to follow your suggested courses of action.
Each town and village has its own individual relations score with you. You can raise this by doing Village Elder and Guildmaster quests, which also help improve the prosperity of that town or village; you can lower it by attacking them. Increasing your relations with a town will decrease the cost of the items the various merchants sell by a factor of 0.5% for every +3 relations you have, (ex. 0 has no effect, 1-3 reduces by 0.5%, 4-6 reduces by 1% etc.), for a total of 16.5% reduced cost with 99 relations. Burning a village will affect your relations scores with the village and its owner but not with the faction itself. Besieging a town will lower your relations with the town, its owner, and the faction. If your relation with a village is negative they are unlikely to have troops willing to join your party.