This story is well known:
Jonah and the Whale (Jonah 1-2): Jonah was appointed by God to tell the people of Ninevah of their destruction because of their wickedness. Jonah was afraid and hid from God on a ship. When a storm occurred, the seamen threw Jonah overboard to please God, and the seas calmed. Jonah was then swallowed by a "great fish" (whale) for three days and then was "vomited" up onto dry land.
Jonah then delivered the message to the people of Ninevah, they prayed to be saved, and they were saved from destruction (i.e., God changed His mind about destroying them). Jonah was angry about these people being saved, and God illustrated to Jonah that Gentiles (non-Jews, like the people of Ninevah) can be important to God.