Jonah was inside a large fish. From deep inside the fish, Jonah began to seriously repent for having disobeyed the Lord, and to sing praises for God and gave thanks to him. Then the fish was upset with a stomachache, and spit him up on the beach, four days after it swallowed him.
Thrown into the sea, Jonah lost his consciousness but woke up. Then, he expressed the gratitude to God for salvaging him. He left for Nineveh, slowly, on the heavy steps. Travelling all around cities, he thought that all he should do was to deliver the God's messages. He cried out, with the first thing he came into his head.
"Everyone, repent for your sins against the Lord. You should ask the Lord to forgive your sins against the Lord, during your lives." If God gets angry, you will be ruined!"
Actually, he wanted that the people of Nineveh would be punished for having not repented about their sins. But, the king of Nineveh listened carefully to it, and ordered the people to repent. Then, God forgave them and left Nineveh not destroyed.