When any of your people die, it will leave behind a Human Corpse on that square unless the square is already occupied by something. Corpses count as unpleasant things and will drive away immigrants, as do the Stink Clouds they give off.

Corpses and the Stink Clouds can be gotten rid of either by using the Corpse in a Grave (decorations, outdoor) or by right clicking and deleting them. The Stink Clouds persist until the Corpse is removed by one of the above methods, or until it decays into Human Remains.