prophecy: Spirit-inspired speech that declares God's message, whether as the gift, the spoken word, or the written record
The English word prophecy makes most people think of predicting the future, but that is not the heart of this Greek word. At its root it means speaking out on God's behalf, saying publicly what God has made known. Foretelling can be part of that, but it is only one possibility, not the core. The word covers the whole activity of inspired speech: the gift a person is given, the actual word that gets spoken, and, in a few places, the finished written record left behind.
Because of that range, the same word points to different things in different verses. Sometimes it names the ability itself, listed among the gifts God gives to the church. Sometimes it names a specific message spoken aloud in a gathering. Sometimes it names Scripture, the settled prophetic writings of the Old Testament, and once even the book of Revelation describing itself. And sometimes it names the ongoing act of prophesying. These are not separate words but one word seen from different angles, and only the surrounding sentence tells you which angle is in view.
The New Testament writers did not borrow this idea from the fortune-tellers and oracle-shrines of the wider Greek world. They took it from the Greek Old Testament, where it translated a Hebrew word for the message of Israel's prophets. So the background is the God who speaks to his people through chosen messengers, not the trance and riddle of a pagan oracle.