According to Genesis, Noah had three sons when Noah's Ark was built: Shem, Ham, and Japheth. These sons entered the Ark with Noah, their mother, and their wives.
The family relationship matters because Genesis describes the flood narrative as the survival of Noah's household rather than Noah's survival alone. After the flood, the three sons are presented as ancestors of peoples known to the biblical authors. The story later gives special attention to events involving Ham and Noah, while Shem and Japheth also receive genealogical treatment.
Some later traditions debate the exact identity of Noah's wife and the historical peoples associated with the sons, but the number of sons in Genesis is clear. The account does not say that Noah had seven sons, and the Ark's animal instructions should not be confused with the number of Noah's children. In Islamic tradition, Noah's family is also important, though the Quran's presentation differs in details from Genesis.