Boiling process usually changes substances into a gaseous form. But in the case of an egg it solidifies the inside portion of egg. Why is it so?
Eggs have lots of protein in them. This protein is in aliquid form. When you boil an egg, you increase the temperature in the liquid form of the protein in the egg. The temperature causes the bonds between the proteins in the liquid part of the egg to unfold, or break. At the same time, the increased heat causes the water part of the egg to separate from the protein molecules in the egg. The protein molecules now reform bonds between themselves, forming longer chains of protein. This is the form the egg takes after being submitted to heat of boiling, becoming a solid form of protein, as opposed to a liquid form of protein. Eggs may be prepared like this in several different ways. Hard-boiling is the process we have described above, where the egg is immersed in boiling water for about eight to ten minutes. The egg is then removed from the heat, the boiling water removed and replaced with cool water, which stops the cooking process.