Corpses are unburied workers who have died either of sickness or through combat. Enemies (barring wolves) killed while raiding your civ will also generate corpses. If left unburied, corpses will cause additional workers to get sick. Healers can cure sick workers, as can cats (with a certain upgrade), while clerics can bury corpses and so help stop the spread of additional sickness.
[Go into more detail about sickness, equations, charts, etc.]
If corpses are turned into zombies, the proportion of zombies in your population restricts the maximum and minimum happiness of your civ, and reduces the effect of any given happiness change. In other words, zombies can never get happy (or, indeed, unhappy) and this is reflected in your overall happiness stat.
Therefore, to maintain a blissful bonus, the highest zombie-to-people ratio is under one fifth. But the happiness bonus is actually a fully sliding scale behind the scenes. The happiness indicator is mostly there to obscure the actual game variable behind an easier-to-understand label.
Healers can cure sick workers at a rate of about 1 every 5 seconds. Cats also cure sick workers at an unknown rate. Clerics will bury corpses at a rate of 1 per second.
Additionally, there are three permanent Pantheon Upgrades which can affect corpses. The first, Warmth of the Companion, is available for the Deity of Cats, and will allow cats to help heal the sick. The second, Abide No Waste, is available for the Deity of Fields, and will cause workers to eat corpses if there is no food left. The third, A Feast for Crows, will reduce the likelihood of corpses causing illness.
They are mainly used for the Deity of the Underworld. The Raise Dead upgrade will allow buried corpses to be resurrected and turned into Zombies, excellent soldiers who do not need to eat and never get sick.