It's not something we westerners are going to be familiar with, and we should count our selves lucky. The idea of having internal migration between cities and regions policed within a nation like they were borders of foreign nations violates one of the basic tenants of Western society. Imagine wanting to leave Los Angeles for Houston or Boise for Seattle, but not being allowed to do so, or if you were allowed, constantly living under the knowledge that the government could uproot you at any moment, not to mention your 2nd class citizen status.
It has existed in China for thousands of years, and it existed because of the very fractured nature of China. Provinces and regions were constantly breaking away and being reassumed to what ever Imperial dynasty came along. It makes sense to see why such a system developed in the turbulent history of China. But in a modern state, the Hukou is a truly evil system.