Observation of the various stages of decomposition can help determine how long a body has been dead.
The first stage is autolysis, more commonly known as self-digestion, during which the body’s cells are destroyed through the action of their own digestive enzymes. However, these enzymes are released into the cells because of the cessation of active processes in the cells, not as an active process. In other words, though autolysis resembles the active process of digestion of nutrients by live cells, the dead cells are not actively digesting themselves as is often claimed in popular literature and as the synonym self-digestion of autolysis seems to imply. As a result of autolysis, liquid is created that gets between the layers of skin and makes the skin peel off. During this stage, flies (when present) start to lay eggs in the openings of the body: eyes, nostrils, mouth, ears, open wounds, and other orifices. Hatched larvae (maggots) of blowflies subsequently get under the skin and start to eat the body.
The second stage of decomposition is bloating; bacteria in the gut begin to break down the tissues of the body, releasing gas that accumulates in the intestines, which becomes trapped because of the early collapse of the small intestine. This bloating occurs largely in the abdomen, and sometimes in the mouth and genitals. The tongue may swell. This usually happens in about the second week of decomposition. Gas accumulation and bloating will continue until the body is decomposed sufficiently for the gas to escape.
The third stage is putrefaction. It is the last and longest stage. Putrefaction is where the larger structures of the body break down, and tissues liquefy. The digestive organs, the brain, and lungs are the first to disintegrate. Under normal conditions, the organs are unidentifiable after three weeks. The muscles can be eaten by bacteria or devoured by carnivorous animals. Eventually, sometimes after several years, all that remains is the skeleton.