In the Pali scriptures there are two theories of the process of re-birth with differing prominence.
The standard view is an elaboration of the chain of dependent origination Pratītyasamutpāda/Paṭiccasamuppāda, where this process happens according to most stand-points, including the abhidhammic, between the elements 2 and 3 - saṅkhāra and viññāna. Three conditions need to come together for a woman to become pregnant and bear a child:
- her womb
- the semen of a man
- the consciousness of a dying person
Combined these three result in the consciousness of a new person and then (number 4) also in a psychophysical entity (still in the womb). Compare for this the Mahanidanasutta of DN.
The other view is that of something of a spirit of the deceased, called gandhabba, that wanders around searching for a locus of rebirth. This is a more 'popular' conception of rebirth and it seems to lie behind the prescribed number of days you mention. I don't recall the scriptural reference for this, it would be great, if anyone could supply that.
Not to mix things up, the states you mention are the six gatis, realms of rebirth, compare my answer here: Is there an equivalent of heaven and hell in Buddhism? for more information and a source.
More or less there should be these two conceptions in all of the traditions, the first one being more scientific, the second one more popular and - if I may add - in this form totally not to be reconciled with 'scientific Buddhism'.
EDIT: The Pudgalavāda or Vatsīputrīya school of Hīnayāna-buddhism claimed that when a person dies, this very person becomes some sort of "intermediate being" - upapāduka sattva - until that person is reborn.