How does the process of protein denaturatation work?
Basically, the egg-white (just another protein structure) is made of long chains of amino acids. They're held in shape by weak bonds. When you heat the structure, the energy you put in, is enough to break those bonds, thereby destroy the structure. This process has a name for it.

Once the temperature is high enough, new covalent bonds can form between the amino acids, and the amino acids in some other protein and they become entangled into a much more complicated structure, which is completely different from the real one. As you cool, you get this finished structure as cooked egg...