What reincarnates if the Buddha says that we have no soul?

Famous dialogue between king Milinda and Arhat Ven. Nagãrjuna.

t 1670b nāgasena bhikṣu sūtra

2.16. The Same or Different; Those Who are Reborn

The king asked, “When a person dies, and he is reborn in a good or in a bad realm, does the body and spirit remain the same as the old one or become another?”

Nāgasena replied, “It is neither the same old body and spirit, nor is it apart from the old one.”

Then Nāgasena asked the king, “When you, the king, were a baby you were fed by your mother’s milk, and now you are a grown man, so are you the same or different?”

“The child is one, I am another.” said the king.

Then Nāgasena said, “When a person is in the womb of his mother, is the embryo which is just formed, the same as the embryo which becomes a form? Is it the same as the one that assumes skin and flesh, or when it is newly born, or when it is a few years old, (is it the same at all these stages of life)? Just as a person learns from a book, can another person do the work for him?”

“No, another person cannot do the work for him.”

Again Nāgasena asked, “If a person violates the law and is to be punished, can an innocent one replace him?”

“It cannot be,” said the king.

Nāgasena spoke to the king in terms of spiritual effort and criminal law, but the king could not understand it and said to Nāgasena, “How would you explain it if asked to do so?”

Then Nāgasena explained, “I would say that I am the same person as when I was a baby. The body of the grown man is a continuity of the original embryo and the baby. Therefore the life principle of the grown up man and the baby is fed within this same continuity—the body.”

Nāgasena asked the king, “Suppose a person were to light a lamp, would it burn throughout the night?”

“It might do so,” replied the king.

“Now is it the same flame that burns in the first watch of the night, at midnight and at dawn?”

“No, it is not the same flame.”

“Then, is one lamp lit in the first watch of the night, and another lit at midnight and again another lit at dawn?”

“No, it is not. But the light continues burning from the same lamp (from first watch through) to midnight till dawn.” Nāgasena said, “Just so is the continuity of a person from life to life. One passes away and another comes into being, and thus from the continuity, one is reborn, becomes old and dies. From the last phase of his self-consciousness, one is reborn into a new life and goes on continuously. In this flux, it is neither the same personality nor one different from the old. After death, the personality goes on to be reborn again.”

Then Nāgasena gave a simile, “It is like the milk that turns into curds, and from curds to butter, then from butter to ghee. Can the butter and ghee be called milk?”

“No, it cannot be called milk.”

“The consciousness of a person is like the milk, milk can turn into curds, then from curds to butter, and from butter to ghee. The spirit of a person is the same, from the spirit, a person is reborn, grows up, and becomes old. From old age comes death, and after death, the consciousness is again reborn. When this body comes to an end, it takes another body. It is like the interchange of two wicks (of a lamp).”

“Excellent, Nāgasena.”

/r/Buddhism Thread