I believe that this is a fundamental question that no-one knows the answer to. I vaguely remember reading something about this years ago in a book called (I think) "Vibrational Medicine". This looked at possible explanations of how such things as homoeopathy work. I think it put forward the idea that there is some kind of electromagnetic field that surrounds the body that signals to the cells what they should grow into. If an answer could be found to your question, it could lead perhaps to methods for controlling cancer or growing back lost limbs or other organs.