A prophet was an individual selected by God as a mediator to communicate directly with Him and relay His messages to certain peoples. The prophet's foremost duty was to share God's words to certain people, whom God designated a message for. A prophet would also voice concerns of the people to God. God communicated via prophets throughout both the timeframe of the Old Testament and the New Testament, because His pure presence cannot be beared. In particular, the nation of Israel received messages from God, through the method of prophets.
Various amounts of prophets were used in various times with different roles. A majority were given some miraculous power, often the ability to see in the future. Some prophets only received one-time revelations, while others served in larger capacities, like advising Israel's King or speaking to condemned people groups. Some individuals in the Bible are considered prophets, not because of a recorded prophecy, but because their actions symbolically foretold something.
While a majority of the prophets in the Bible received their messages from Yahweh, the one true God, there were also many false prophets: who would either make up their own prophecies, or would receive visions from Pagan gods, which in reality were Satan and his Demon followers.