Once upon a time, the whole earth was full of evil and human crime which really upset God. Hence he decided to punish human being by just confiscate them from Earth. The only exception was Noah, an honest and moral man to God and Noah was instructed by God to build an ark for him and his family in preparation for a catastrophic flood that would destroy every existence on earth.
God also instructed Noah to bring into the ark two of all living creatures, a male and a female, along with essential food to be stored for everybody in the ark. Noah obeyed everything God commanded him to do. After they entered the ark, it rained heavily and continuously on earth for a period of forty days. The whole earth was flooded by water for period of hundred and fifty days, and all the living creatures were wiped out. As slowly the water level receded, the ark came to rest on the mountains of Ararat. Noah and his family continued to wait for almost eight more months until the surface of the earth got dried out. Finally after an entire year, God invited Noah to come out of the ark. Immediately, he built an altar and worshiped the Lord with burnt offerings of the clean animals. God was pleased by the offerings and promised Noah that he would never destroy the living creatures as he had done now and said "Never again there will be a flood to destroy the earth." As a mark of this eternal covenant God formulate rainbow in clouds.