Dora Bas Rivka Silver O'H
The flood raged for forty days. It covered the mountains and tossed the ark around. Everything on Earth perished except for the people and animals that were safely ensconced inside the ark.
It may have rained for a "mere" 40 days, but the waters continued to churn for 150. At that time, G-d gave special consideration to the inhabitants of the boat and sent a wind that caused the waters to subside. After 150 days, the waters had noticeably receded. On the 17th day of the month of Nisan, the ark came to rest on Mt. Ararat (in what is now Turkey). The waters continued to recede until the mountain tops became visible, on the first day of the month of Tammuz.
After 40 days, Noach opened the window and sent out a raven to see what it might find. The raven went back and forth over the waters, without success. Next, Noach sent a dove. On the first attempt, the dove couldn't find a place to rest and returned to the ship. Noach tried again a week later; this time, the dove returned with a fresh olive leaf in its mouth. (This is popularly depicted as an olive branch, but the text says it was a leaf.) From this, Noach could tell that the waters had receded considerably.
Noach waited another week and made one final attempt with the dove. This time, the dove did not return, which indicated that it had found a new home. From this, Noach knew that it would soon be time to open the ark and release the inhabitants after their year-long confinement. He opened the hatch on Rosh Hashana and by the 27th of Cheshvan, the land was back to normal. (The flood started on 17 Cheshvan; this was exactly one solar year later.)
An interesting comment from Rashi: The Torah says that the raven went back and forth "until the waters dried up." Rashi quotes the Midrash that the raven was reassigned to another mission, namely bringing food to the prophet Elijah during a drought, i.e., when "the waters dried up." (See I Kings 17:6.)