When people use the term "hit the road" as an idiom, they’re generally either urging someone to leave a place and take a journey, or they’re declaring that they are about to depart and take a trip somewhere themselves. In either case, the term usually suggests a journey that’s long enough to be considered potentially eventful, although sometimes it may be used more casually in reference to a shorter trip. There are also cases where people may use "hit the road" in a more figurative way to reference something like a change of plans, and this sort of reference might be useful for any subject where the concept of a journey is used as a metaphor.
The basic source for this idiom could be considered fairly obvious. Most forms of human transportation throughout history, including walking, driving, or riding animals, have relied on some sort of direct contact with the ground. Additionally, when people are at rest in a dwelling, they’re usually going to be on some kind of floor other than dirt. So, the act of leaving one place and going elsewhere is also generally tied into leaving the comfort of interior floors and venturing out onto the rougher surface of the soil outside, thereby hitting the road. The actual process of movement often involves some kind of impact, with feet or hooves striking repeatedly, which is generally the reason "hit" is used.
The most common use of the term "hit the road" is during a farewell of some kind. If a person has been visiting somewhere and he is about to leave, he might say, "I had a good time visiting, but now I need to hit the road." When people use the term this way, it often implies that they have pressing business elsewhere, or perhaps they’ve simply spent too long in one place and have finally begun to feel restless. It can also be used in this way to describe any sort of figurative journey. For example a politician might say, "We’ve been sitting still too long on these reforms, it’s time for us to hit the road and start making real changes."
Sometimes hit the road can have a very negative connotation. If someone has overstayed his welcome, or been rude to his hosts, he might be instructed to hit the road immediately. In fact, the term is very often used in cases where people take advantage of their hosts in some way while visiting, and it is also very much associated with cases of people not paying rent and being forced to leave a hotel or house.
Negative uses of the idiom can also be applied to figurative situations. For example, if a married couple gets into an argument, one of them might tell the other that it’s time to hit the road, and the meaning could imply more than just the physical act of leaving. "Hitting the road" in this sense could imply a total separation in the relationship where the two people go their separate ways on their own figurative life journeys.