Question: how does edo tensei work?
Answer: Edo Tensei is an application of the Summoning Technique. Tobirama being the genius that he is, performed the godly feat of devising a way of summoning the souls of the deceased from the Pure Land. The jutsu then puts the summoned soul in the body of a deceased individual, using it to host the soul.