The way it folds up determines its chemical and biological properties. The protein is held in shape by cross-links between different parts of the amino acid string. When you cook an egg you break these cross-links, causing the proteins to unfold. This is called denaturing the protein. All these process work in slightly different ways but end up with the same result - 'cooked' egg.
All molecules are in constant motion.
Very high temperatures may also damage the amino acids that make up the protein, lowering the nutritional value of the food. Because heat effects all of the cross-links in the protein, it is the most effective way to cook an egg. Two things happen when you beat an egg. First the whipping has a tearing action on the protein, literally pulling it apart and denaturing it. Secondly, the surface tension at the surface of all the little bubbles also makes the protein unfold and denature.