First, here is a gratuitous excuse for a picture of a tortoiseshell cat, showing the characteristic ginger and brown mottled patterning: http://en.wikipedia.org/wiki/File:Long-haired_tortoiseshell_DSCF0193.JPG
You may be aware that the vast, vast majority of tortoiseshell cats are female, and the few male ones are pretty likely to be infertile. It should be obvious, then, that the sex chromosomes are involved somewhere down the line, and this is indeed the case.
At the stage of embryonic development where the zygote consists of a few hundred cells, all but one X chromosome shuts down and is never heard from again. This chromosome becomes a small structure at the edge of the nucleus called a Barr body, which is the usual diagnostic tool for detecting chromosomal abnormalities- for example a male with Klinefelter Syndrome (XXY sex chromosomes) will have one Barr body per cell, whereas a chromosomally normal male would have none. As a side note, it is demonstrable from this that the developmental differences in women with Turner Syndrome (has only one sex chromosome, an X) are all laid down in the very early embryo, as after that stage *all* women have only one active X chromosome per cell.
So, how does this make a tortoiseshell cat? There is a gene on the X chromosome that has two alleles, which for the sake of simplicity we will call Orange and Black. So in a heterozygotic female cat, ie one with one copy of Orange and one copy of Black, the few tens of cells which will later become the skin of the cat will all randomly have one of these genes inactivated and thus solely express the other one. And each one of these cells will divide during later development to become a patch of skin cells all with ginger or black fur, thus leading to the random mottled effect.
This effect is known as mosaicism, and for obvious reasons the vast majority of human females (and a few males) are in fact a chromosomal mosaic. However, genes which make this obvious from visual inspection don't really exist in humans.
Male cats, of course, have only one X chromosome, expressing either the Orange or the Black gene. Which, of course, also explains why the majority of pure-ginger cats are male; the Orange allele is recessive, and inherited in the same way as colour-deficieny in humans (explained yesterday). The very rare male tortoiseshell cat has the equivalent of Klinefelter Syndrome in humans, and is XXY.