Decomposition begins from the second of death in human bodies. The first stage of decomposition, called the "fresh" stage, begins when the heart stops beating. Blood stops pumping to the extremities and settles due to gravity, causing the skin to become bluish-purple. After a few hours, rigor mortis kicks in. At the same time, the body begins the process of autolysis, in which pH changes in the body trigger the structural breakdown of cell walls. Those cells release digestive enzymes which completely destroy the cell. And while all that is going on, aerobic bacteria in the body are gobbling up all of the oxygen that remains inside, but since there's no new oxygen coming in, they soon die off, leaving a perfect space for anaerobic bacteria to jump in. They start chowing down on any liquids and fats in the body and producing nasty stuff--gases, acids, that kind of thing--which turn into bloat. And that's not even accounting for visible insects like blowflies.