HOW REBIRTH TAKES PLACE
"The pile of bones of (all the bodies of) one man
Who has alone one aeon lived
Would make a mountain's height --
So said the mighty seer."
To the dying man at this critical stage, according to Abhidhamma philosophy, is presented a Kamma, Kamma Nimitta, or Gati Nimitta.
By Kamma is here meant some good or bad act done during his lifetime or immediately before his dying moment. It is a good or bad thought. If the dying person had committed one of the five heinous crimes (Garuka Kamma) such as parricide etc. or developed the Jhānas (Ecstasies), he would experience such a Kamma before his death. These are so powerful that they totally eclipse all other actions and appear very vividly before the mind's eye. If he had done no such weighty action, he may take for his object of the dying thought-process a Kamma done immediately before death (Āsanna Kamma); which may be called a "Death Proximate Kamma."
In the absence of a "Death-Proximate Kamma" a habitual good or bad act (Ācinna Kamma) is presented, such as the healing of the sick in the case of a good physician, or the teaching of the Dhamma in the case of a pious Bhikkhu, or stealing in the case of a thief. Failing all these, some casual trivial good or bad act (Katattā Kamma) becomes the object of the dying thought-process.
Kamma Nimitta or "symbol," means a mental reproduction of any sight, sound, smell, taste, touch or idea which was predominant at the time of some important activity, good or bad, such as a vision of knives or dying animals in the case of a butcher, of patients in the case of a physician, and of the object of worship in the case of a devotee, etc...
By Gati Nimitta, or "symbol of destiny" is meant some symbol of the place of future birth. This frequently presents itself to dying persons and stamps its gladness or gloom upon their features. When these indications of the future birth occur, if they are bad, they can at times be remedied. This is done by influencing the thoughts of the dying man. Such premonitory visions  of destiny may be fire, forests, mountainous regions, a mother's womb, celestial mansions, and the like.
Taking for the object a Kamma, or a Kamma symbol, or a symbol of destiny, a thought-process runs its course even if the death be an instantaneous one.
For the sake of convenience let us imagine that the dying person is to be reborn in the human kingdom and that the object is some good Kamma.
His Bhavanga consciousness is interrupted, vibrates for a thought-moment and passes away; after which the mind-door consciousness (manodvāravajjana) arises and passes away. Then comes the psychologically important stage --Javana process -- which here runs only for five thought moments by reason of its weakness, instead of the normal seven. It lacks all reproductive power, its main function being the mere regulation of the new existence (abhinavakarana).
The object here being desirable, the consciousness he experiences is a moral one. The Tadālambana-consciousness which has for its function a registering or identifying for two moments of the object so perceived, may or may not follow. After this occurs the death-consciousness (cuticitta), the last thought moment to be experienced in this present life.
There is a misconception amongst some that the subsequent birth is conditioned by this last death-consciousness (cuticitta) which in itself has no special function to perform. What actually conditions rebirth is that which is experienced during the Javana process.
With the cessation of the decease-consciousness death actually occurs. Then no material qualities born of mind and food (cittaja and āhāraja) are produced. Only a series of material qualities born of heat (utuja) goes on till the corpse is reduced to dust. 
Simultaneous with the arising of the rebirth consciousness there spring up the 'body-decad,' 'sex-decad,' and 'base-decad' (Kāya-bhāva-vatthu-dasaka). 
According to Buddhism, therefore, sex is determined at the moment of conception and is conditioned by Kamma not by any fortuitous combination of sperm and ovum-cells. 
The passing away of the consciousness of the past birth is the occasion for the arising of the new consciousness in the subsequent birth. However, nothing unchangeable or permanent is transmitted from the past to the present.
Just as the wheel rests on the ground only at one point, so, strictly speaking, we live only for one thought-moment. We are always in the present, and that present is ever slipping into the irrevocable past. Each momentary consciousness of this ever-changing life-process, on passing away, transmits its whole energy, all the indelibly recorded impressions on it, to its successor. Every fresh consciousness, therefore, consists of the potentialities of its predecessors together with something more. At death, the consciousness perishes, as in truth it perishes every moment, only to give birth to another in a rebirth. This renewed consciousness inherits all past experiences. As all impressions are indelibly recorded in the ever-changing palimpsest-like mind, and all potentialities are transmitted from life to life, irrespective of temporary disintegration, thus there may be reminiscence of past births or past incidents. Whereas if memory depended solely on brain cells, such reminiscence would be impossible.
"This new being which is the present manifestation of the stream of Kamma-energy is not the same as, and has no identity with, the previous one in its line -- the aggregates that make up its composition being different from, having no identity with, those that make up the being of its predecessor. And yet it is not an entirely different being since it has the same stream of Kamma-energy, though modified perchance just by having shown itself in that manifestation, which is now making its presence known in the sense-perceptible world as the new being. 
Death, according to Buddhism, is the cessation of the psycho-physical life of any one individual existence. It is the passing away of vitality (āyu), i.e., psychic and physical life (jīvitindriya), heat (usma) and consciousness (vi257;na).
Death is not the complete annihilation of a being, for though a particular life-span ends, the force which hitherto actuated it is not destroyed.
Just as an electric light is the outward visible manifestation of invisible electric energy, so we are the outward manifestations of invisible Kammic energy. The bulb may break, and the light may be extinguished, but the current remains and the light may be reproduced in another bulb. In the same way, the Kammic force remains undisturbed by the disintegration of the physical body, and the passing away of the present consciousness leads to the arising of a fresh one in another birth. But nothing unchangeable or permanent "passes" from the present to the future.
In the foregoing case, the thought experienced before death being a moral one, the resultant rebirth-consciousness takes for its material an appropriate sperm and ovum cell of human parents. The rebirth-consciousness (patisandhi vi257;na) then lapses into the Bhavanga state. 
The continuity of the flux, at death, is unbroken in point of time, and there is no breach in the stream of consciousness.
Rebirth takes place immediately, irrespective of the place of birth, just as an electromagnetic wave, projected into space, is immediately reproduced in a receiving radio set. Rebirth of the mental flux is also instantaneous and leaves no room whatever for any intermediate state  (antarabhava). Pure Buddhism does not support the belief that a spirit of the deceased person takes lodgement in some temporary state until it finds a suitable place for its "reincarnation."
This question of instantaneous rebirth is well expressed in the Milinda Pa
The King Milinda questions:
"Venerable Nagasena, if somebody dies here and is reborn in the world of Brahma, and another dies here and is reborn in
"They would arrive at the same time. O King.
"In which town were you born, O King?
"In a village called Kalasi, Venerable Sir.
"How far is Kalasi from here, O King?
"About two hundred miles, Venerable Sir.
"And how far is
"About twelve miles, Venerable Sir.
"Now think of the
"I have done so, Venerable Sir.
"And now think of
"It is done, Venerable Sir.
"Which of these two, O King, did you think the more slowly and which the more quickly?
"Both equally quickly, Venerable Sir.
"Just so, O King, he who dies here and is reborn in the world of Brahma, is not reborn later than he who dies here and is reborn in
"Give me one more simile, Venerable Sir."
"What do you think, O King? Suppose two birds were flying in the air and they should settle at the same time, one upon a high and the other upon a low tree, which bird's shade would first fall upon the earth, and which bird's later?"
"Both shadows would appear at the same time, not one of them earlier and the other later. "
The question might arise: Are the sperm and ovum cells always ready, waiting to take up the rebirth-thought?
According to Buddhism, living beings are infinite in number, and so are world systems. Nor is the impregnated ovum the only route to rebirth. Earth, an almost insignificant speck in the universe, is not the only habitable plane, and humans are not the only living beings.  As such it is not impossible to believe that there will always be an appropriate place to receive the last thought vibrations. A point is always ready to receive the falling stone.