In direct response to the "variations" of normal balls, yes it is genetics, but it is uncontrollable genetics.
Much like Piebald or paint horses. You can have a black and white paint mare and breed her to a black and white paint stallion. Even if all the foals are black and white paints, no two will look the same. They will all have varying amounts of black and white pattern. Some may even be deeper black like the mare, and some more grey like their sire.
This explains why you can own two dozen normal ball pythons and no two will look the same.
Now as far as actual morphs go, that is another story. Ball Pythons have two basic types of color morph, dominant and recessive. Dominant morphs only require one copy of the gene from either parent to produce offspring of the same type. However, the offspring either will inherit the gene or they won't. Meaning either they show the gene or they don't carry it.
Recessive genes are more complicated. It takes two copies of the gene, one from each parent, to produce offspring of the desired type. However, unlike in the case of dominant, some offspring will inherit one gene and some will inherit two. Those who have only one copy are said to be "het" and while they appear normal, they still carry that gene hidden in their blood. When bred to another ball who has a copy of that gene, you once again get the chance of the offspring getting two copies of the gene and thus being a visual morph.
As in the case of say, Ghost/Hypo balls. Ghost is a recessive morph. In order to produce more ghosts, you need one gene from the male and one from the female. Obviously the best odds come from breeding a ghost to another ghost. In this case, all the offspring will inherit two copies of the ghost gene and will be ghosts. However, if you breed a male ghost to a female who is het ghost, half of the babies will be ghosts, and the other half will be normals, but still carry the ghost gene. If on the other hand you breed one het ghost to another het ghost, things get more complicated.
Statistically, one out of four babies will be a ghost. Two out of four will be visually normal het for ghost, and one out of four will be nothing but normal. This gives rise to the term 66% het. In a clutch of four babies, statistically 2/3 will be het ghosts or 66% of the babies will be hets.
I hope I didn't confuse you even worse.
Gale