When Paul refers to "the apostles and prophets" he is referring to New Testament apostles and prophets. These apostles and prophets are the "foundation gifts" (Eph. 2:20). The apostles were those men sent by the Lord Himself. Read more... But not all the New Testament writers were apostles, and yet some of their words and writings were just as much inspired as the apostles' writings. These speakers and writers were called prophets. This gift was not limited to writing, because much of what they spoke by inspiration was not written down (1 Cor. 2:13). They were prophets in the sense of:  forth-telling the revealed mind of God (like Judas and Silas; Acts 15:32),  foretelling the future (like Agabus; Acts 11:28; 21:10), or  receiving divine inspiration (like Mark, James, etc.) to pass on orally or in written form (Romans 16:25-26). We don’t have New Testament apostles and prophets with us in person, but we do have their writings. The reason we don’t have them in person is that they were the foundation (Eph. 2:20), which is already complete. Thankfully, what God saw fit to give us was written down and canonized, so we have these gifts with us "till we all come" (at the rapture). Those who hold covenant theology are attempting to show the Church in the Old Testament. They want to say that the Old Testament prophets were part of the Church's foundation (Eph. 2:20), and that the Mystery was known to them (Eph. 3:5). This is false, and it doesn't fit in the context of each passage. For instance, how could the mystery have been known to Old Testament prophets if it has been hid from ages and from generations, but now is made manifest to his saints” (Col. 1:26). Also, if Old Testament prophets were intended, the order would have been reversed, as in 2 Peter 3:2. Rather than say "apostles and prophets" Paul would have said "prophets and apostles". By mentioning prophets after apostles, it shows that they are not Old Testament prophets.
Related: Spiritual Gifts
New Testament Apostles and Prophets.
Prophetic Scriptures. In Romans 16:25-26 we read that “the mystery” (a New Testament revelation) has been made manifest by prophetic scriptures. It is clear that “prophetic scriptures” could not be Old Testament prophetic scriptures because Paul had just said that silence had been kept in past ages! This is another proof that New Testament writings are referred to as prophetic by the Holy Spirit. Some of these writings were already in existence at the time Romans was written (e.g. 1 Corinthians), and some of them followed after, such as Ephesians and Colossians.