Hazrat Yunus was appointed prophet by Allah for the people of Nineveh (North Western Iraq). The people were stubborn, and they refused to listen to his teachings.
He became annoyed and disappointed with the lack of progress with the people. So, he prayed to Allah to punish the people for not listening to His words, and decided to take the river ferry to go another territory.
While crossing the river, great tides of the sea started to engulf the ferry. When it appeared that the boat would sink, the captain of the boat addressed the passengers. He said that there was someone amongst them who had run away from his master, and that this person should give himself up and come forward so that he may be tossed overboard to save the rest. No one moved for a while. When the next wave struck the boat, and it was evident that the end was near, they decided to toss a coin and it fell for Hazrat Yunus. So he was thrown in the river and the storm subsided immediately and all on board the ferry were saved.
The large fish
As for Hazrat Yunus, a large fish with a huge belly swallowed him. Then, Hazrat Yunus repented for his rage and realized what he had done.His repentance was accepted, and the fish spat him out on to dry land. His skin eroded from the digestive juices of the fish. He suffered great pain and discomfort because of the flies and the sun. He sought forgiveness from Allah for having abandoned his mission. Allah caused a plant to grow near him and he rested under its shadow by the river bank, and reflected over the extraordinary experience.
In the meantime, his people had realized their error. They repented for their sin and ventured out in search of Hazrat Yunus. They found him and rejoiced seeing him alive. They took him back and promised to live by his teachings. He lived amongst his people to a long and ripe age. When he passed away, he was buried near the same place where the great fish had spat him out. Many devout followers started to build their homes at this location and it soon developed into a bustling city. The city of Kufa is located at the same historic site and the grave of Hazrat Yunus is located at the bank of the river.
Thus, Hazrat Yunus is also addressed by the names Dhun-Nun, which means Man of the Fish, and Sahibil Hot, which means Companion of the Fish.
Rasulallah once said, "I do not know that there is anybody better than Yunus ibn Matta." (Bukhari).