"An insulting word for a person who lives in the country and does not know about life in the cities."
The word hick first appeared in the 1220s, as a rhyming nickname for Rick (which is in turn the shortened form of Richard). Rhyming nicknames were common in those days, and we still use many of them, such as Bill from Will (from William), and Bob from Rob (from Robert). These were often used as a diminutive form to begin with, but later became more common and formalized, to the extent that we have surnames like Hickson, Hixson, and Hixon, all meaning the 'the son of Hick'.
As with many nicknames, Hick eventually came to mean a random man-on-the-street. The same happened with John, Jack, and Tom, along with Richard itself. Hick continued down this path, however, until it became insulting. It came to mean an innkeeper or hackneyman (i.e., someone for rent) and by the 1700s it came to refer to any provincial, unworldly person, a rube. We still use it in this sense today.