"There is a passage in the Buddhist Sutra on Mindfulness called the Nine Cemetery Contemplations. Apprentice monks are instructed to meditate on a series of decomposing bodies in the charnel ground, starting with a body 'swollen and blue and festering,' progressing to one 'being eaten by . . . different kinds of worms,' and moving on to a skeleton, 'without flesh and blood, held together by the tendons.' The monks were told to keep meditating until they were calm and a smile appeared on their faces."
The different stages of decomposition:
1) Autolysis (self-digestion) - Enzymes operate unchecked and begin eating through the cell structure, allowing liquid inside to leak out.
a) "skin sloughage" or "gloving", where the liquid from the cells gets between the layers of skin and loosens it.
b) somewhere around this time maggots start doing their work.
2) Putrefaction and bloating - bacteria starts breaking down and liquifying tissue, producing gas
which gets trapped in the popular feeding ground areas of the mouth, the abdomen and the genitalia. Eventually something bursts, like the intestinal lining.
3) Dissolution- the body collapses into itself and seeps into the ground (or the coffin-lining). The digestive organs, lungs, and brain goes first. Sometimes the skin mummifies before it can be eaten by corpse-friendly beetles. It all depends on the weather. And packaging.
-info from "Stiff" by Mary Roach