"Prophecy" comes from Greek root words meaning "to speak for" or "to speak on behalf of", particularly with respect to messages received from a spiritual source.
Thus, while prophecy has a commonly-used sense of predicting or foretelling future events (which prophecy certainly may do, and which is one means of verifying the authenticity of both the prophecy and the prophet (Deuteronomy 18:21-22)), the general term applies to any message received and transmitted to others on behalf of such a source -- in particular the God of the Bible, who repeatedly used such means to communicate His messages (to the nation of Israel and to other nations, as well) through selected individuals.
In the verse cited in the question, Peter is saying that such messages from God to Israel were not merely the personal thoughts, opinions, or inventions of any of the individuals with whom God communicated, but were the words that God Himself intended to convey.