Byzantine imperial succession is governed by the Born in the Purple trait. It's a trait that's given to your kids that are born *while you are emperor.* Peeps with the trait "jump the line" in front of those who don't have it. So let's say I have four sons:
Joe, age 6
Stephen, age 4
Frank, age 3 - Born in the Purple
Imhotep, age 1 - Born in the Purple
The actual succession order is Frank, Imhotep, Joe, Stephen.
There is, however, a "Despot" honorary title that counts as Born in the Purple for succession purposes. That's a common workaround if you have non-BitP kids you really want to inherit. In the example above, I could make Stephen or Joe a Despot and they'd be first in line to succeed me. Not sure if you can give it to grandkids, though.