According to Genesis, Noah was told to take seven pairs of clean animals. Genesis 7:2 distinguishes clean animals from animals that are not clean, instructing Noah to take seven pairs of the former and one pair of the latter.
The passage is not a general statement that every animal entered in seven pairs. Its distinction between clean and unclean animals is the key detail. Genesis 7:3 separately mentions birds of the sky in groups of seven, while Genesis 7:8-9 summarizes the animals entering the Ark two by two.
This apparent difference has prompted extensive discussion because the Flood narrative contains closely placed instructions and summaries. Some readers interpret “seven pairs” as seven male-female pairs; others note translation differences in the underlying Hebrew wording. The clearest broad contrast in the passage is between a larger number for clean animals and one pair for unclean animals.
The answer should not be confused with the later dietary laws in Leviticus, although the clean-and-unclean vocabulary is related to biblical ritual categories.