A body goes stiff when it has no life. This is known as rigor mortis. The body goes stiff in the same position that it was in when it died, and moving the limbs may be difficult and must be done with care.
How does rigor mortis happen? When we breathe in, we take in oxygen. Most of the oxygen we inhale is used to form ATPs (adenosine triphosphate) in the mitochondria of the cell. ATPs are used for energy, movement, activities, etc. The ATPs mainly prevent the actin and myosin from sticking together when the muscles contract. This may be a little confusing if you don't know about actin in myosin. The contraction and relaxation of the actin and myosin are what cause our muscles to move.
Rigor mortis happens because we stop breathing in oxygen when we die, so ATPs cannot be produced to prevent the actin and myosin from keeping fixed positions. However, rigor mortis does not last; a body does not stay stiff for long. Autolysis takes place and the body starts to self digest. The cells of a human body contain lysosomes, which are biological enzymes used to destroy unwanted substances by digesting them. Lysosomes can digest just about anything. When a person dies, his cells burst and the contents flow out. This gives the lysosomes the liberty to digest the entire body. Rigor mortis ends at this point because autolysis takes place and the tissues seem to 'soften' as the body further decomposes.
Forensic pathologists can also make use of rigor mortis by determining the time of death and whether or not a body has been moved.