Dear Student,
Raw eggs contains proteins which are nothing but amino acids. When we boil an egg, a process called denaturation occurs in which these amino acids change their shape from their native form. The heat first breaks or unfolds the proteins. These unfolded protein molecules clump together causing the protein to solidify. This is the reason why eggs become hard after boiling.
Regards