As with many things in life, it depends on several factors: the temperature and humidity, whether the body is in water or not, buried or not, underground or not, embalmed or not, exposed to insects or carnivores or not.
Immediately after death, the heart stops pumping blood around the body and subsequently gravity drags the blood down till it pools in blood vessels in the back of the legs and back; if the body is lying face up. Many cells in the body die as there is no oxygen being delivered for them to carry out their normal metabolic functions. Neurons die within minutes. Skin cells, on the other hand, can last for days because they are able to metabolically perform without oxygen. This is called anaerobic fermentation and lactic acid is a byproduct. Lactic acid causes rigor mortis. It is the same acid that builds up in our muscles after an intense workout and makes them feel stiff. Rigor mortis lasts for about 36 hours.
While this is happening, bacterial cells, that normally live in our intestine begin to rapidly multiply and break down the flesh in the abdomen. In addition, we have no control over the release of our digestive enzymes, so they are free to start digesting our own tissues; the pancreas is one of the first organs to decompose because it is responsible for many of the digestive enzymes we use.
Assuming this body is unfound and untouched, insects arrive to the scene very quickly as they are really sensitive to the smell of decomposition. Flies will lay eggs in skin openings and in entrances to the body; nose, ears and mouth. Maggots will hatch and start eating the decomposing flesh.
All of the breakdown and digestion of the body’s cells are causing gases to be released; these gases are the what give bodies their terrible smell. The gases inflate the remaining intact tissues, causing them to release any stored liquid. A liquidy body cavity is what becomes of our abdomen. This stinking liquid attracts more flies, beatles and other insects. The skin takes on a cottage cheese like appearance. This happens between 4 and 10 days after death. The liquid leaks out into the soil and attracts even more insects. A body can fell warm to the touch at this point due to all of the insect activity. Exposed parts that haven’t yet been consumed start to turn black 10 to 20 days after death.
Between 20 to 50 days after death, the body begins to dry out as all of the remaining flesh is consumed by insects. Maggots can no longer feed on the dry body because they can’t chew through the tough tissue. This is where the beatles take over. They can chew through the remaining tendons and ligaments, until all that is left is bone and hair.
Between 50 to 365 days after death, moths and bacteria consume the hair. All that is left is bone; it can last indefinitely as long as there are no predators around.
This whole process can be hastened or slowed depending upon what happens to the body after death. Bodies last longer in cold and dry environments and are consumed quicker in the heat. Contrary to what you might think, a body lasts longer in the water, than in open air and much longer in the ground than in either of the previous two. Embalming can preserve a body, so that it remains recognisable several months after death, but within a year, bones and teeth are usually all that is left. I am not sure what kinds of coffins are available as I personally haven’t had to deal with this issue, but they may, in addition to embalming slow the decomposition process even more. Depending upon the type of soil that they body is buried in, the bones can last for decades. If the soil is more peaty, the bones will decompose much more quickly.
Egyptian Mummies were embalmed using a different process than that of today, and given their hot, dry climate, an untouched body would last much longer. Priests, who were the embalmers would remove the internal organs, but leave the heart, for it was the essence of the person. Each organ would be placed in a jar and preserved on its own. The brain was removed by a delicate hook inserted into the nose and taken out in small pieces. The absence of these internal organs slowed the decay down significantly. Next, the body cavity needed to be dried out. Priests placed packets of natron, a special type of mineral salt harvested from dry lake beds, to absorb moisture. Once the moisture was gone, the body was rinsed of any natron residue. Next the priests added false eyes and used materials to fill out any distorted features. They then wrapped the mummy in hundreds of meters of linen cloth and binding material. It was believed that the body needed to be intact because it was needed in the afterlife.
Hmmm… I am considering cremation as a viable option.