Praise be to Allaah.
The well-known difference between a Prophet and a Messenger is that a Messenger is one to whom a law is revealed and he is commanded to convey it, whilst a Prophet is one to whom a law is revealed but he is not commanded to convey it. But this distinction is not free of problems, because a Prophet is also commanded to call people, convey the Message and judge among the people.
Hence Shaykh al-Islam Ibn Taymiyah said: The correct view is that the Messenger is one who is sent to a disbelieving people, and the Prophet is one who is sent to a believing people with the sharee'ah of the Messenger who came before him, to teach them and judge between them, as Allaah says (interpretation of the meaning): "Verily, We did send down the Tawraat (Torah) [to Moosa (Moses)], therein was guidance and light, by which the Prophets, who submitted themselves to Allaah's Will, judged for the Jews"
[al-Maa'idah 5:44]
The Messengers are sent to deliver a Message. They are the ones to whom Allah has sent down revelation and who convey His Law to mankind. Allah ordered them to deliver these Messages.
The first Messenger to be sent was Noah and the last one was Mohammad. Allah said, what translated means, (Verily, We have inspired you (O Mohammad) as We inspired Noah and the Prophets after him.) [4:163].
Anas ibn Malik narrated that the Prophet said, during his Hadith about Shafa'ah (the right of intercession on mankind's behalf that Allah grants to His Messenger on the Last Day), "Mankind come to Adam to intercede on their behalf but he declines, saying: 'Go to Noah, the First Messenger that Allah sent...'" [Al-Bukhari]. Also, Allah said, what translated means, (Mohammad is not the father of any man among you, but he is the Messenger of Allah, and the Last (end) of Prophets.) [33:40].