I've been working on my Skyrim character's backstory for a long time now, and there is one thing I've never truly understand / haven't found the answer for:
Is the blood of a dragonborn something that was is hereditary, or does one become dragonborn simply by random chance?
Strictly speaking, neither. Dragonborn status is a blessing conferred by the gods. Specifically Akatosh/Lorkhan.
It seems to me like it would be weird if Martin Septim was called Dragonborn if he wasn't dragonborn (and I suppose he would have gotten his gift since he is related to Tiber Septim), but someone said that it wasn't hereditary, so I had to ask...
I would appreciate it if someone could explain more in detail how exactly one becomes dragonborn.
We're not sure. Presumably its up to the gods' discretion.
Regarding the Cyrodiilic emperors, make sure you've read http://www.imperial-library.info/content/book-dragonborn.
Those who become Emperor and light the Dragonfires are surely Dragonborn - the proof is in the wearing of the Amulet and the lighting of the Fires. But were they Dragonborn and thus able to do these things - or was the doing the sign of the blessing of Akatosh descending upon them? All that we can say is that it is both, and neither - a divine mystery.
Its mysterious because the author can't state what might be the easy answer - that all emperors were not dragonborn - because that would be heretical.
In any case, she makes the point that it might be the ceremony itself that renews the Cyrodiilic pact with Akatosh, obliging him to bestow upon the Emperor this great blessing. If we're going to say purely within the orthodox, I'd say this is the best explanation.