What can negatively affect on human relations? Besides random events like accusation of heresy, among all matters mainly issues connected with titles, estates and interactions. Obvious is that the imprisoned or insulted character won't be happy. If the sovereign decides to punish his vassal in unfair way (e.g. taking his lands away) all of the rest vassals also lose their respect to the ruler. Remember about that, because few unconsidered decisions may lead to the breaking the kingdom. Generally, taking the land away isn't a good idea, because both victim and his descendants will try to take it back, what may lead to the rebellion. So you should do that only when the vassal has to any lands (he is a danger) or he has only one estate. Although, even in such cases you should consider the appropriation and, first of all, do it only when it's justified. The reason is important, because it decreases the negative factor to the relations with the rest of the vassals (look at: Intrigues: Prisoners).
Another matter important for the general image of the rules is a his demesne size. If the ruler cross it, vassals won't be happy. Similarly with the lands not counting into the general pool of lands, for example duchies and kingdoms. If you have few of them, vassals start demand them, what can be really destructive for the kingdom. In such case it's good to give additional lands to the heir. If it is impossible or uncomfortable (heir would have more lands than the father), you may distribute the lands to the vassals. It crucial, that they not consist of the their counts. In other words: you should care that the vassal has no rights to the counts in the given duchy . It's important as far as the fact that cumulated estates are more dangerous during the civil wars, because they generate more army and rebel all together. Rebelled vassal can recruit army only from his counts, not duchies. It's clearly seen during the game: owner of few duchies is less dangerous than the owner of few counts, because he has smaller military potential.
Others factors that affect dissatisfaction among the vassals may be: loses of honour, excommunication, awful personality or short period of reigns. From all those problems only excommunication is easy to solve, you just need to ask pope to cancel it or call up antipope (look at: Religion: Antipope).
What factors make the ruler being good seen by the vassals? Besides described distribution of the lands, it's worth to mention about the war for vassal's lands (screen above). If any of your subject has claim to any territories, you may do 2 in 1: assure vassal the power over the debatable terrain what improves your relation. Some minus of this solution is a fact that the respect marker changes when the war ends. So it may happen that the vassal rebel in the moment you're fighting for his rights. More about such wars you may find in the chapter Military: How to declare a war?
Other ways to please your subjects are easier: you can bribe them, award with a title (look at: Characters: Titles), make them a part of a Council (look at Council), use the chancellor or fulfill one of desires. This last element is especially curious: many of characters dream about some privileges, like finding the proper wife or gaining the crown (screen above). Skillful accomplishing those desires may easily remedy even the big crisis in the kingdom.
But what to do, when all the mediation methods failed, most of vassals sit in the dungeons and sovereign has too many estates? In such cause, the only one possible solution is inviting foreign characters on the court and award them with the lands. You can do it on two ways: by clicking Intrigue button and choosing the proper person to invite (the person is generated randomly) or ask some courtier from the other kingdom (the screen above). The second one is more profitable, because you gain a character with the past and sometimes with the rights to the particular land. It's especially useful, when you think about expansion, you may fight for those lands (Military: How to declare a war?).
If you want to get rid of the problematic vassal and you don't want to imprison or kill him, you can pass him to one of your subjects (if they have higher rank). It's quite useful in a situation when one of yours barons wants to rebel and the civil war would be uncomfortable. In such case the best is to give him under the power one of dukes (screen below).
It's little harder when the subject hates you very much, in such case even relocation may not help. Under such circumstances don't hesitate and kill, imprison or take his lands away.