Assuming simple curiosity is driving your question, the answer depends on whom you ask.
The ancient Egyptians would say if you had enough wealth and status, special priests could preserve you for all eternity. First, they pull out your brain and internal organs, except your heart, which stays. Then they dry out your body with a kind of salt. Most of your organs would be preserved in jars, but your body would get wrapped up in strips of linen and layers of resin before being sealed in a coffin.
Their technique worked pretty well, but they weren't the first to go mummy. Two thousand years earlier, the Chinchorro of Chile and Peru were in the habit of skinning, dismembering and disemboweling bodies before putting them back together with sticks, straw and plant fibers. Then they'd paint the bodies.
More recently, nature did the dirty work for the Inca, who made sacrifices to their gods by bringing kids high up into the Andes Mountains to die. The kids' bodies then became mummified by the dry atmosphere and extreme cold.
Peat bogs, glaciers and deserts can have the same effect. The oxygen-deprived acidic, cold, hot and dry conditions of these environments desiccate bodies and stop decomposition au natural.
So basically, take your pick. Wait, I mean, not really though, right?