The relevant verses are given below.
And of every living thing of all flesh, you shall bring two of every sort into the ark to keep them alive with you. They shall be male and female. Of the birds according to their kinds, and of the animals according to their kinds, of every creeping thing of the ground, according to its kind, two of every sort shall come in to you to keep them alive. (Genesis 6:19-20)
Then the LORD said to Noah, “Go into the ark, you and all your household, for I have seen that you are righteous before me in this generation. Take with you seven pairs of all clean animals, the male and his mate, and a pair of the animals that are not clean, the male and his mate, and seven pairs of the birds of the heavens also, male and female, to keep their offspring alive on the face of all the earth. (Genesis 7:1-3)
The second instruction extends and clarifies the first. So there were seven pairs of all ceremonially clean animals and birds and one pair of each sort of unclean animal. Some of the additional clean animals were for sacrifice (Genesis 8:20).
Some Bible translations have “seven” clean animals rather than “seven pairs” of clean animals (e.g., Gen 7:2 NET)