The Lord had brought six different plagues on Pharoah and his people through Moses and Aaron. The Lord asks Moses to tell Pharoah the following:
But indeed for this purpose I have raised you up, that I may show My power in you, and that My name may be declared in all the earth. As yet you exalt yourself against My people in that you will not let them go. Exodus 9:16-17 NKJV
The Lord says that He has a purpose for Pharoah. He has raised him to power that the Lord may show the world His power. Since Pharoah is against the Lord’s people, He brings a seventh plague: hail, such that Egypt has never seen before. Any man who did not fear the Lord did not seek shelter. Any animal, man, or herb that was outside was destroyed.
Now, Pharoah calls for Moses and Aaron and tells them the following:
And Pharaoh sent and called for Moses and Aaron, and said to them, “I have sinned this time. The Lord is righteous, and my people and I are wicked. Entreat the Lord , that there may be no more mighty thundering and hail, for it is enough. I will let you go, and you shall stay no longer.” Exodus 9:27-28 NKJV
Interestingly, Moses says that he knows Moses and his people will not yet fear the Lord, but he stops the hail from coming to show them that the world belongs to the Lord.
And when Pharaoh saw that the rain, the hail, and the thunder had ceased, he sinned yet more; and he hardened his heart, he and his servants. So the heart of Pharaoh was hard; neither would he let the children of Israel go, as the Lord had spoken by Moses. Exodus 9:34-35 NKJV