It was by the apostolic Tradition that the Church discerned which writings are to be included in the list of the sacred books.
This complete list is called the canon of Scripture. It includes books for the Old Testament (45 if we count Jeremiah and Lamentations as one) and for the New.
The Old Testament: Genesis, Exodus, Leviticus, Numbers, Deuteronomy, Joshua, Judges, Ruth, and Samuel, and Kings, and Chronicles, Ezra and Nehemiah, Tobit, Judith, Esther, and Maccabees, Job, Psalms, Proverbs, Ecclesiastes, the Song of Songs, the Wisdom of Solomon, Sirach (Ecclesiasticus), Isaiah, Jeremiah, Lamentations, Baruch, Ezekiel, Daniel, Hosea, Joel, Amos, Obadiah, Jonah, Micah, Nahum, Habakkuk, Zephaniah, Haggai, Zachariah and Malachi.
The New Testament: the Gospels according to Matthew, Mark, Luke and John, the Acts of the Apostles, the Letters of St. Paul to the Romans, and Corinthians, Galatians, Ephesians, Philippians, Colossians, and Thessalonians, and Timothy, Titus, Philemon, the Letter to the Hebrews, the Letters of James, and Peter, 1, and John, and Jude, and Revelation (the Apocalypse).
Source: Catechism of the Catholic Church (Vatican.va)