Also worth pointing out is that while the water the egg is in is boiling, the contents of the egg have not yet reached a boiling temperature, because it is a mixture of a lot of compounds (including proteins, as jim mentioned). The heat provides the energy for chemical reactions to occur in those eggs, and in this case, the end result is a solid.
Chemical reactions induced by heat are the basis of all cooking, to react the molecules in the food in a way that alters the flavor, color, texture, to something more enjoyable. For example, your bread turning brown when you toast it is the caramelization of the sugars exposed to heat, which is a chemical reaction. Or, in the case of something like a cake, getting everything added such as egg, milk, sugar and flour to react properly when heated so you change from a liquid to a very tasty solid.