Ravana was not only the king of Lanka, he was also a great scholar, expert in all 16 branches of knowledge then known. He was also a great veena player, a great poet, having composed the well known Shiva Tandava Stotram ( given below ), a great warrior who had conquered many lands, and also a great devotee of Lord Shiva.He was the son of Vishrava, a great and good rishi ( sage ).
But he had a 'rakshasi pravritti' ( wicked nature ), which was the cause of his downfall. This just shows that being learned and competent is one thing, and being good is another. One should be both.
It also shows that a good man, like Vishrava, can have a wicked son like Ravana, while a wicked man like Hiranyakashyap can have a good son like Prahlada.