And is someone able to explain step by step how herritage by children works? Like when I marry my son to... his kid should herritage the title... Like that?
There are three factors that influence inheritance. In order of importance: kinship, gender, age. Excepting elective succession and seniority succession, which have special rules, it works like this:
Find the current holder of a title. The heir will be whoever has the closest blood relationship to the holder: children first, siblings second, half-siblings third, and (I think) cousins fourth. If multiple people are within the same degree of kinship, e.g. the title holder has four different children, a male heir is preferred if succession law is set to cognative-agnative. (If succession law is set to agnative, females are
never considered. If succession law is set to cognative, males receive no special preference.) If there are multiple male heirs, the oldest one is preferred.
The confusing thing is that someone's position in the line of succession can be inherited. That is, let's say you have three brothers--the oldest one is preferred for succession, and the middle one is second in line of succession. If the middle brother has a child, the youngest brother is
not third in line. Because the middle brother is second in line, succession would pass through that brother and to the brother's child, if the elder brother and the middle brother were to both die. Similarly, if the older brother gets a child, that child will be second in line (because succession passes through the oldest brother) and the middle brother will be third in line, with the middle brother's child becoming fourth in line.
Another example: you've got an older brother, a middle sister, and a youngest brother. In a cognative-agnative succession, the older brother is first, the youngest brother is second (because gender is more important than age), and the sister is third. In an agnative succession, the youngest brother is second, the sister isn't considered at all, and the title holder's brother would be third in line.
Gavelkind succession divides the title holder's titles over those in the line of succession (which is determined as above), with those higher in the line of succession getting better titles. That is, if a king who is also duke dies, the first in line becomes king and the second in line becomes duke.
If you want to gain a title from marriage, marry someone as high in the line of succession is possible. If you're marring a female to a male in the line of succession, make sure it's a matrilineal marriage! Then, it's simply a matter of killing off everyone that's higher in the line of succession. Try to kill adults before children, because if adults in front of you in the line have kids, you'll need to kill those kids as well.