The king name is Arjuna. As he was the son of the king Krritavarya, he was also famously known as Kartivirya. He is the ruler of Haihayas with Mahishmathi as the capital. He had thousand arms. This king was killed by Parashurama. 

The war between him and Ravana is given  in the Uttara Kanda of Valmiki Ramayana. 

Once, Arjuna came to Narmada River sporting with his wives. The same day, Ravana also came to there and asked his counselors where was his king with a wish of fighting and defeating him in a battle. 

The counselors  said him about their King's absence. After hearing them, Ravana proceeded to the banks of Narmada river. Pleased by the beauty of the Narmada river, he and his ministers descended into the waters of Narmada. After getting out, he worshipped the Golden Shiva Linga which was with him wherever he went. He worshipped Shiva Linga with various flowers. 

  Not very far from the distance where Ravana was worshipping Shiva and collecting flowers, there was the King Kartavirya Arjuna along with this wives. In order to show the strength of him, he stopped the flow of the Narmada river. His strength caused the river flow in he opposite direction. Due to the flow of the river, the flowers carried by Ravana were carried away. Ravana gave up the worship in the middle and asked his ministers Shuka and Sharana to know the cause for this. They take the aerial way and know that this is caused by the king Arjuna. They return to Ravana and report this saying thus 

>  "O lord of Rakshasas, an unknown person, huge as a Sala tree, is sporting with females obstructing the course of Narmada like unto a dam. And being withheld by the thousand arms of that man the waters of Narmada were continually throwing up high waves."

Ravana was enraged by this have gone to the counselors of Arjuna and said 

> At the very sight the eyes of the lord pf Rakshasas, proud of his prowess, grew red and addressing the councillors of the king Arjuna he said "Do ye communicate unto the king of Haihayas that Ravana, the lord of Rakshasas, hath come to fight with him." 

Hearing the words of Ravana, the ministers of the King Arjuna stood up and said

> O good Ravana, thou art well cognizant Of the proper time for fighting. Now our king is drunk and is sporting with the females in the waters. And now dost thou wish to fight with him. Therefore, O Dasagriva, do thou spend the night here, if thou art bent upon fighting. Or even if thou art anxious to enter speedily into conflict with Arjuna do thou slay us all at first, and then fight with the king.

Thereupon, the followers of Ravana slew up the soldiers of Arjuna and ate them and some killed the ministers of his. 
 
Hearing those words and saying unto the females "Do not fear"he rose up from the waters like an elephant. The eyes of that fire like Arjuna were reddened with fire and he shone dreadfully like the fire of dissolution. And taking up speedily his club, that one, always using golden clubs, pursued the Rakshasas like unto darkness following the sun.

Here is the combat between Ravana and Kartavirya Arjuna which is an excerpt of [37th chapter](http://ancientvoice.wikidot.com/src-vrm:ram7-37) of Uttara Kanda.

> Throwing down of his hand the iron mace, he, in anger, began to roar, like Yama. And the top of the mace was ablaze like the tips of Asoka flowers. Not the least agitated on beholding that mace, the king Arjuna, by his club, bafled its action.

> All the councillors having thus led away and Prahasta being slain Ravana speedily proceeded towards Arjuna, the foremost of kings. Thereupon there ensued a terrible encounter capable of making down erect between the thousand armed Arjuna, the king of men, and the twenty armed Ravana, the king of Rakshasas, And taking up their clubs Arjuna and Ravana began to fight with one another emitting cries like the mutterings of clouds, like unto two huge bulls fighting for a cow, two agitated oceans, two moving mountains, two effulgent Adityas, two burning flames, two proud elephants, two proud lions and like the very Rudra and Kala. As the mountains suffer many clappings of thunder bolts so did they bear many strokes.

> And all the quarters were resounded with the sound proceeding from the stroke of their clubs like unto the sound of thunder bolts. Being placed against the breast of Ravana Arjuna s club rendered, for a moment.the welkin look like the burning gold as does the lightning.

> The King of men and the King of Rakshasas battled and wounded one another with their clubs like unto the bulls stiking one another with their horns and like two elephants with their tusks. Thereupon worked up with rage, Arjuna, with his full might, smote Ravana with his club. But Ravana was well protected by the boon of the celestial, so the club fell down to earth sundered into two pieces like one hurled by a poor wight.

> Still wounded by the the mace of Arjuna, Ravana, after hiding tears, ran away at a distance of four feet and stood there. Beholding Ravana thus overwhelmed, Arjuna sprung up and caught him like Garuda holding a serpant and Vishnu binding Bali. Dasagriva being thus bonded the Siddhas, Charanas and the Devas exclaimed, "Well done! Well done !!"showered flowers upon Arjuna.

> Then the king emitted leonine roars again and again like a tiger joyous like a cloud, hodling a deer under its grasp. Regaining his senses and beholding Ravana bound, Prahasta, in great anger, pursued, king of Haihaya. And the Rakshasa once grew tempestous like unto the rising of the ocean during rains.

> Thereupon exclaiming repeatedly "Leave him off! Leave him off!! Wait! Wait!!" The Rakshasa host hurled hundreds of Musalas and darts in the battle field. Not the least moved thereby the king Arjuna, the slayer of enemies, bore those weapons of the enemies of the Devas. Thereupon baffling the weapons of the Rakshasas by means of many a dreadful and excellentweapons, Arjuna, the king of Haihayas, drove them away like winds scatteing the clouds.

> Having thus struck terror unto to night rangers, he, encircled by his own kinsmen, repaired to his own city with Ravana. carrying him bound like unto Indra carrying Bali bound. Thereupon flowers and fried paddy were showered upon him by the Brahmanas and citizens.

Ravana was later released by the King Kartavirya Arjuna due to request of Ravana's father sage Vishravas Brahma.