This may sound a little gruesome, but bear with me.
Meat is mostly the muscle tissue of an animal. Most animal muscle is roughly 75% water, 20% protein, and 5% fat, carbohydrates, and assorted proteins. Muscles are made of bundles of cells called fibers.
Each cell is crammed with filaments made of two proteins: actin and myosin.
In a live animal, these protein filaments make muscles contract and relax. Both actions require enormous amounts of energy, which they get from the energy-carrying molecule ATP (adenosine triphosphate). The most efficient generation of ATP requires oxygen, which muscles get from circulating blood.
After an animal is slaughtered, blood circulation stops, and muscles exhaust their oxygen supply. Muscle can no longer use oxygen to generate ATP and turn to anaerobic glycolysis, a process that breaks down sugar without oxygen, to generate ATP from glycogen, a sugar stored in muscle.
The breakdown of glycogen produces enough energy to contract the muscles, and also produces lactic acid. With no blood flow to carry the lactic acid away, the acid builds up in the muscle tissue. If the acid content is too high, the meat loses its water-binding ability and becomes pale and watery. If the acid is too low, the meat will be tough and dry.
Lactic acid buildup also releases calcium, which causes muscle contraction. As glycogen supplies are depleted, ATP regeneration stops, and the actin and myosin remain locked in a permanent contraction called rigor mortis. Freezing the carcass too soon after death keeps the proteins all bunched together, resulting in very tough meat. Aging allows enzymes in the muscle cells to break down the overlapping proteins, which makes the meat tender.
Individual protein molecules in raw meat are wound-up in coils, which are formed and held together by bonds. When meat is heated, the bonds break and the protein molecule unwinds. Heat also shrinks the muscle fibers both in diameter and in length as water is squeezed out and the protein molecules recombine, or coagulate. Because the natural structure of the protein changes, this process of breaking, unwinding, and coagulating is called denaturing.