It depends on the type of cell, and where they die. In a living body, cells may undergo apoptosis, a regulated cell death that signals the immune system to eat the dead cells; or necrosis, in which the dead cells stick around, degrade into toxins, often killing other nearby cells in a chain reaction. In a dead body, most cells survive for awhile and only starve to death when ATP (adenosine triphosphate, the chemical energy cells burn for just about everything) runs out. The cell's own lysosomes begin to digest the cell, a process known as autolysis. By this time, bacteria, too, is eating the body.
When bacteria or protists die it really depends on the species, the debris is eaten by other bacteria or protists and a few will leave spores that invade whatever eats them. When plant or fungus cells die, their cell wall prevents any stewing toxins from spreading to killing the rest of the plant, so there is no immune response to get rid of them.