He was not a prophet, but he was a powerful and wise ruler.
Some exegetes believe he was Alexander the Macedonian (the Great), but some modern exegetes believe he was Cyrus the Great. They believe the descriptions of Dhul Qarnayn fit him more.
Here is more information on him from Allamma al-Majlisi:
https://www.al-islam.org/hayat-al-qulub-vol-1-allamah-muhammad-baqir-al-majlisi/account-dhul-qarnayn