Because of how evil the people were, noah and his family were not evil so God told him to build an arc and put his family on it and two of every animal, after it rained for 40 days and nights the earth was completely filled with water and once it evoporated God put a rainbow in the sky which is a promise to never flood the earth ever again.
Funny. I don't mean to be a nerd here, but technically Noah didn't stop people from coming on the Ark. The people chose not to go on it, and they ridiculed him. But, it is Noah whom God chose to build the thing in the first place.