The entire Book of Nahum can be summed up in a single sentence: God is going to destroy Nineveh because it's wicked. Nahum isn't satisfied with just saying that however. He wants us to know that Nineveh is a dirty whore and God is going to strip her naked and smear filth over her:
Swords flashing, spears gleaming,
Many slain, a mass of corpses,
And countless dead bodies--
They stumble over the dead bodies!
All because of the many harlotries of the harlot,
The charming one, the mistress of sorceries,
Who sells nations by her harlotries
And families by her sorceries.
"Behold, I am against you," declares the Lord of hosts;
"And I will lift up your skirts over your face,
And show to the nations your nakedness
And to the kingdoms your disgrace.
"I will throw filth on you
And make you vile,
And set you up as a spectacle.
"And it will come about that all who see you
Will shrink from you and say,
'Nineveh is devastated!
Who will grieve for her?'
Where will I seek comforters for you?"
I kind of get the impression that Nahum doesn't care for Nineveh very much. And really, who can blame him? Nineveh was the capital of Assyria which was oppressing the Jewish people.
Jonah is a fellow Nineveh-hater. When God commands Jonah to preach to the people of Nineveh, he gets on a ship going to Tarshish which is in the opposite direction. He doesn't want Nineveh to be saved. God punishes him for his disobedience, however. Jonah gets tossed overboard and swallowed by a fish. After three days, he relents:
And Jonah began to enter into the city a day's journey, and he cried, and said, Yet forty days, and Nineveh shall be overthrown. So the people of Nineveh believed God, and proclaimed a fast, and put on sackcloth, from the greatest of them even to the least of them. [...] And God saw their works, that they turned from their evil way; and God repented of the evil, that he had said that he would do unto them; and he did it not. (Jonah 3:4-5, 10)
Naturally, this pissed Jonah off:
But it greatly displeased Jonah and he became angry. He prayed to the Lord and said, "Please Lord, was not this what I said while I was still in my own country? Therefore in order to forestall this I fled to Tarshish, for I knew that You are a gracious and compassionate God, slow to anger and abundant in lovingkindness, and one who relents concerning calamity. "Therefore now, O Lord, please take my life from me, for death is better to me than life." (Jonah 4:1-3)
The Book of Jonah ends with Jonah still wishing he were dead. The point of the story is not to be prejudiced against other nations. Basically, don't be a Nahum.
According to tradition, the people of Nineveh repented in Jonah's time, but generations later, they became wicked again and were destroyed during Nahum's time. However, modern scholars consider Jonah to have been written in response to Nahum.
Nahum and Jonah both contain prophecies about the city of Nineveh and both describe the inhabitants of the city as wicked. They both quote Exodus 34:6 which describes God as slow to anger (Jonah 4:2, Nahum 1:3) and they both end with a question (Jonah 4:11, Nahum 3:19).
Nahum has no reference to Jonah, which is kind of strange if it was indeed written generations later. However, Jonah does seem to contain a reference to Nahum. In Jonah 3:10 where God repents of the evil he said he would do to Nineveh, the verb for repent that is used is the same verb from which the name Nahum is derived.
Nahum expresses a hatred of foreigners while Jonah urges his readers to be compassionate towards them. Basically, Jonah was written by a cosmopolitan and Nahum was written by a xenophobe.