In the earliest generations of mankind people have turned their backs on God. They lied, cheated and murdered. They even worshipped idols. Only one man, Noah and his family were deemed righteous by following God's laws. God told Noah that he was going to destroy humanity by flooding the entire earth. God tells Noah to build an ark so that his family and all of God's creatures (7 pairs of each) could be spared. After 12 decades (120 years) the task is finally completed. God brings down a relentless rainstorm for 40 days and 40 nights. The entire earth is flooded with water covering the mountaintops. Everyone/everything excluding Noah, his family and the animals inside the ark are destroyed.
One year after the flood began Noah and his family exit the ark and walk on dry land. God created the rainbow as a symbol that he would never flood the earth again.
At the time of the Great Flood, he was one of the few whom God deemed righteous enough to be spared. Noah built a very big boat, where a male and female of all species would be safe. When the Flood came, the plan worked very well. When it ended, a new world began.
It's unknown whether Noah let her wife inside the boat or not, since, according to Quran, she was an atheist, and the Bible mentions almost nothing of her.