The most important and trickiest part of cat genetics is getting a handle on the sex-linked red gene, especially if you want to learn to predict the offspring of two cats. Because this gene is located on the X chromosome, it behaves quite differently from the other genes.

This is also the reason you might have heard that male kittens take after their mother, while mollies take after both parents when it comes to pelt color. While true in a sense, I strongly advise you to forget it, since it seems to confuse as many people as it helps.

In cats and most other mammals, there are two main types of pigment in the skin and hair. Eumelanin is the black pigment, while phaeomelanin is the red pigment. In cats, eumelanin is responsible for black and brown colors, while phaeomelanin is responsible for red, orange, and yellow tones.

Your typical plain black cat actually has both eumelanin and phaeomelanin in its fur, but because eumelanin is so much darker, it becomes the dominant effect, and you can't see the phaeomelanin's color, except sometimes as a slight reddish cast in the sunlight. The sex-linked red gene simply prevents the cat from producing eumelanin, allowing the phaeomelanin's color to show.

The tricky bit is that, as previously mentioned, this gene is on the X chromosome. In male cats with only one X chromosome, this is simple - either they are red, or they aren't. But female cats have two X chromosomes to work with, and so they can be tortoiseshell, having patches of both red and black. This happens when one X chromosome has the red allele (XO) and the other has the "not-red" allele (Xo). (The more proper notation is Xᴼ and Xᵒ, but those are difficult to read.)

Genotype Color
XoY Black, male
XOY Red, male
XoXo Black, female
XOXO Red, female
XOXo Tortoiseshell, female

And then some punnet squares wheeee