God told Noah to take seven pairs of each clean animal, seven pairs of each bird, and one pair of each unclean animal. As to the people on the ark, only Noah's family was to be spared. From Genesis 6:
I am going to bring floodwaters on the earth to destroy all life under the heavens, every creature that has the breath of life in it. Everything on earth will perish. 18 But I will establish my covenant with you, and you will enter the ark—you and your sons and your wife and your sons’ wives with you.
Genesis 7:
The Lord then said to Noah, “Go into the ark, you and your whole family, because I have found you righteous in this generation. 2 Take with you seven pairs of every kind of clean animal, a male and its mate, and one pair of every kind of unclean animal, a male and its mate, 3 and also seven pairs of every kind of bird, male and female, to keep their various kinds alive throughout the earth.
I am going to bring floodwaters on the earth to destroy all life under the heavens, every creature that has the breath of life in it. Everything on earth will perish. 18 But I will establish my covenant with you, and you will enter the ark—you and your sons and your wife and your sons’ wives with you.
Genesis 7:
The Lord then said to Noah, “Go into the ark, you and your whole family, because I have found you righteous in this generation. 2 Take with you seven pairs of every kind of clean animal, a male and its mate, and one pair of every kind of unclean animal, a male and its mate, 3 and also seven pairs of every kind of bird, male and female, to keep their various kinds alive throughout the earth.