As the Catechism of the Catholic Church states:
105 God is the author of Sacred Scripture. “The divinely revealed realities, which are contained and presented in the text of Sacred Scripture, have been written down under the inspiration of the Holy Spirit.”
This is elaborated in the Vatican II document Dei Verbum, the Dogmatic Constituition on Divine Revelation:
11. Those divinely revealed realities which are contained and presented in Sacred Scripture have been committed to writing under the inspiration of the Holy Spirit. For holy mother Church, relying on the belief of the Apostles (see John 20:31; 2 Tim. 3:16; 2 Peter 1:19-20, 3:15-16), holds that the books of both the Old and New Testaments in their entirety, with all their parts, are sacred and canonical because written under the inspiration of the Holy Spirit, they have God as their author and have been handed on as such to the Church herself. In composing the sacred books, God chose men and while employed by Him they made use of their powers and abilities, so that with Him acting in them and through them, they, as true authors, consigned to writing everything and only those things which He wanted.
Therefore, since everything asserted by the inspired authors or sacred writers must be held to be asserted by the Holy Spirit, it follows that the books of Scripture must be acknowledged as teaching solidly, faithfully and without error that truth which God wanted put into sacred writings for the sake of salvation. Therefore “all Scripture is divinely inspired and has its use for teaching the truth and refuting error, for reformation of manners and discipline in right living, so that the man who belongs to God may be efficient and equipped for good work of every kind” (2 Tim. 3:16-17, Greek text).
The inspiration of the Scriptures is not, however, a matter of some sort of mechanical dictation. Rather, as the Catechism explains:
106 God inspired the human authors of the sacred books. “To compose the sacred books, God chose certain men who, all the while he employed them in this task, made full use of their own faculties and powers so that, though he acted in them and by them, it was as true authors that they consigned to writing whatever he wanted written, and no more.”
107 The inspired books teach the truth. “Since therefore all that the inspired authors or sacred writers affirm should be regarded as affirmed by the Holy Spirit, we must acknowledge that the books of Scripture firmly, faithfully, and without error teach that truth which God, for the sake of our salvation, wished to see confided to the Sacred Scriptures.”
Nevertheless, the ‘Word of God’ is first and foremost not a book but Christ Jesus himself. As the Catechism says:
108 Still, the Christian faith is not a “religion of the book”. Christianity is the religion of the “Word” of God, “not a written and mute word, but incarnate and living”. If the Scriptures are not to remain a dead letter, Christ, the eternal Word of the living God, must, through the Holy Spirit, “open (our) minds to understand the Scriptures.” (Luke 24:45)