Junior heirs are also given any lower title that's de jure theirs. The realm succession law determines who will inherit each title without its own succession law. Note that except for devoted, the progeny of disinherited characters is disqualified as well. Theocratic characters cannot inherit either. The following traits disinherit as well: bastard founder, devoted, disinherited, eunuch, order member. Bastards cannot inherit unless legitimized. Note that with male preference, all daughters are ineligible as long as any sons exist vice versa for female preference. The gender law determines which children are eligible. This will be your primary heir as well, unless the primary title will be inherited by a character of another dynasty. The player heir is the character that you will continue playing as when your current ruler dies.
The person who inherits the ruler's primary title is called the primary heir. An heir is any character who stands to inherit a title.