In my opinion, although the word "prophesy" is often associated by people with the foretelling or predicting of future events, the root meaning of the word (which is derived from the Greek prefix "pro-" (meaning "for" or "on behalf of") and the verb "phenai" (meaning "to speak")) is "to speak on behalf of". In this sense, the word in a Christian context means "to speak on behalf of God", or (more commonly) "to preach" -- that is, to deliver a message that is intended to provide inspired spiritual guidance or direction from God, as if it were spoken by God Himself, with the aim that those hearing the message can understand and apply it.
In the Beatitudes at the beginning of the Sermon on the Mount (Matthew 5:3-12), Jesus told His followers (Matthew 5:11-12) that they were to consider themselves blessed when people would curse them, revile them, and utter evil words about them because they were His disciples, since that was also what had happened to the prophets who preceded them. Those who spoke inspired messages to Israel on God's behalf should have been treated with honor, but they commonly were not (often because they told people things that those people did not want to hear).
In the verse cited in the question, Paul is advising his readers not to repeat the mistakes of those about whom Jesus had been speaking by willfully disregarding or dismissing out-of-hand those who preach on behalf of God, or (even worse) treating them with contempt or even actively persecuting them, but instead to listen to their preaching; to consider it in light of what is said in God's revealed word (as the Berean Jews did, for example, in Acts 17:11); to take to heart what is found to be valid or useful; and then to apply it to their lives.