In a Nutshell:
Prophets (anbiya) brought revelation to nations or peoples that were receptive (e.g., Adam, Ismaeel, Ishaaq, Suleiman or Yahya). Messengers (rusul) were sent to hostile nations that had abandoned revelation (e.g., Nuh, Hud, Saleh, Lut, Ibrahim, Musa, Isa, Yusuf and Muhammad). Prophets are not messengers, but messengers can be prophets, where they gain followers who are receptive to their message.