The law of Moses contains a list of the animals God considers clean and of those that are unclean. It appears in Leviticus 11. Clean animals could be eaten and many of them were acceptable as sacrifices to God. Unclean animals were not acceptable either as food or as sacrifices. Noah lived long before God gave the law but he knew the difference between clean and unclean animals. This is shown by the instructions God gave him as to what animals he should take on the ark.
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.
The extra clean animals were intended to enable him to offer sacrifices to God.
Then Noah built an altar to the LORD and took some of every clean animal and some of every clean bird and offered burnt offerings on the altar.