Praise be to Allaah.
There are a number of views on this issue, one of which is that of Ibn Taymiyah (may Allaah have mercy on him):
“A Prophet (Nabi) is one to whom Allaah reveals (yanbi’uhu) something, and he passes on what Allaah has reveals to him. If he is sent with that to those who go against the commandments of Allaah, to convey a message from Allaah to them, then he is a Messenger. But if he follows a sharee’ah that came before him, and is not himself sent to anyone to convey the message from Allaah to them, then he is a Prophet and not a Messenger…” (al-Nubuwwaat, p. 255). Other scholars add different details, but these are the most important of them. And Allaah knows best.
Sheikh Muhammed Salih Al-Munajjid